Eliminate ByteBuffers

Outside - Karl's ACM kpauls at acm.org
Mon Oct 6 11:40:50 PDT 2008


If it's possible to port the new APIs in question to J2ME or other limited Java profiles then I would see the point of an interface which replaced all "ByteBuffer src" parameters with "byte[] src, int off, int len". Please do not allocate byte arrays inside these methods so that static-memory systems do not have to avoid them.

I think the ability to pass straight Object types back and forth opens up the ability for the file system implementers to create exact attribute to object mappings. I do not see that solely as an advantage, but also as a possible dependency on platform-specific libraries.


> -----Original Message-----
> From: nio-discuss-bounces at openjdk.java.net [mailto:nio-discuss-
> bounces at openjdk.java.net] On Behalf Of Elliotte Harold
> Sent: Monday, October 06, 2008 8:07 AM
> Subject: Re: Eliminate ByteBuffers
>
> Mark Thornton wrote:
>
> > What sort of data do you expect to find in named attributes? NTFS
> > alternate data streams could contain anything and would usually be
> binary.
>
> An object would be preferable. Allow file system specific
> implementations to return whatever type make most sense for them.
>
> Less optimally make it a byte array.



More information about the nio-discuss mailing list