On 4/13/06, Michael Bauroth <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> has somebody a short code snippet, how I can convert an ASCII span,
> which represents a long (e.g. 1234) from ByteBuffer to the simple java
> type long most efficiently (minimum of new object generation / buffer
> copies ...)


For now, you have to use ByteBuffer.getString() and then parse it using
Integer.parseInt().  It's not optimal but works fine. :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to