mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DIRMINA-490) Add a getSlice(int) method to IoBuffer
Date Fri, 07 Dec 2007 14:47:43 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Trustin Lee resolved DIRMINA-490.

    Resolution: Fixed
      Assignee: Trustin Lee

I've just added IoBuffer.getSlice(int length) and IoBuffer.getSlice(int index, int length).
 The former uses the current position of the buffer and throws IndexOutOfBoundsException if
position + length exceeds the current limit.  The latter is similar to other getter methods
with index; it doesn't bother with the current position and limit of the buffer.  Please try
these methods and close this issue if you are satisfied with the implementation.  :)

> Add a getSlice(int) method to IoBuffer
> --------------------------------------
>                 Key: DIRMINA-490
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-490
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: David M. Lloyd
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>         Attachments: getSlice.patch
> Add a method to IoBuffer that lets you read a given number of bytes, returning those
bytes as a slice IoBuffer.
> Enclosed is a simple patch to do this.  This method can be implemented completely in
terms of other IoBuffer methods; therefore it can go on the IoBuffer base class without affecting
other subclasses.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message