You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Julien Vermillard (JIRA)" <ji...@apache.org> on 2005/04/22 14:36:23 UTC

[jira] Created: (DIRMINA-17) ByteBuffer.wrap(byte[])

ByteBuffer.wrap(byte[])
-----------------------

         Key: DIRMINA-17
         URL: http://issues.apache.org/jira/browse/DIRMINA-17
     Project: Directory MINA
        Type: Improvement
 Environment: the Mina ByteBuffer class don't implements the two static wrap method of java.nio.ByteBuffer :
static ByteBuffer 	wrap(byte[] array)
          Wraps a byte array into a buffer.
static ByteBuffer 	wrap(byte[] array, int offset, int length)
          Wraps a byte array into a buffer.
    Reporter: Julien Vermillard
 Assigned to: Trustin Lee 
    Priority: Trivial


I'm used to to use it a lot :) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-17) ByteBuffer.wrap(byte[])

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-17?page=comments#action_63484 ]
     
Julien Vermillard commented on DIRMINA-17:
------------------------------------------

the code to add :

    /**
     * Wraps the specified byte array into MINA buffer. 
     * {@link java.nio.ByteBuffer#wrap(byte[])}
     */
    public static ByteBuffer wrap( byte[]array )
    {
        return wrap(java.nio.ByteBuffer.wrap(array));
    }
	
	/**
     * Wraps the specified byte array into MINA buffer.
     * {@link java.nio.ByteBuffer#wrap(byte[], int, int)}
     */
    public static ByteBuffer wrap(byte[] array,
		    int offset, int length)
    {
        return wrap(java.nio.ByteBuffer.wrap(array,offset,length));
    }
	


> ByteBuffer.wrap(byte[])
> -----------------------
>
>          Key: DIRMINA-17
>          URL: http://issues.apache.org/jira/browse/DIRMINA-17
>      Project: Directory MINA
>         Type: Improvement
>  Environment: the Mina ByteBuffer class don't implements the two static wrap method of java.nio.ByteBuffer :
> static ByteBuffer 	wrap(byte[] array)
>           Wraps a byte array into a buffer.
> static ByteBuffer 	wrap(byte[] array, int offset, int length)
>           Wraps a byte array into a buffer.
>     Reporter: Julien Vermillard
>     Assignee: Trustin Lee
>     Priority: Trivial

>
> I'm used to to use it a lot :) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DIRMINA-17) ByteBuffer.wrap(byte[])

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-17?page=all ]
     
Julien Vermillard closed DIRMINA-17:
------------------------------------


work

> ByteBuffer.wrap(byte[])
> -----------------------
>
>          Key: DIRMINA-17
>          URL: http://issues.apache.org/jira/browse/DIRMINA-17
>      Project: Directory MINA
>         Type: Improvement
>  Environment: the Mina ByteBuffer class don't implements the two static wrap method of java.nio.ByteBuffer :
> static ByteBuffer 	wrap(byte[] array)
>           Wraps a byte array into a buffer.
> static ByteBuffer 	wrap(byte[] array, int offset, int length)
>           Wraps a byte array into a buffer.
>     Reporter: Julien Vermillard
>     Assignee: Trustin Lee
>     Priority: Trivial

>
> I'm used to to use it a lot :) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIRMINA-17) ByteBuffer.wrap(byte[])

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-17?page=all ]
     
Trustin Lee resolved DIRMINA-17:
--------------------------------

    Resolution: Fixed

I added two methods you suggested.

But please note that MINA buffers are going to be pooled, and therefore there can be waste of memory if you wrap your byte array specifying offset and length.

> ByteBuffer.wrap(byte[])
> -----------------------
>
>          Key: DIRMINA-17
>          URL: http://issues.apache.org/jira/browse/DIRMINA-17
>      Project: Directory MINA
>         Type: Improvement
>  Environment: the Mina ByteBuffer class don't implements the two static wrap method of java.nio.ByteBuffer :
> static ByteBuffer 	wrap(byte[] array)
>           Wraps a byte array into a buffer.
> static ByteBuffer 	wrap(byte[] array, int offset, int length)
>           Wraps a byte array into a buffer.
>     Reporter: Julien Vermillard
>     Assignee: Trustin Lee
>     Priority: Trivial

>
> I'm used to to use it a lot :) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira