Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about ByteBuffer

 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is from the ByteBuffer doc of j2sdk:
An implementation of the Java platform may optionally support the creation of direct byte buffers from native code via JNI. If an instance of one of these kinds of buffers refers to an inaccessible region of memory then an attempt to access that region will not change the buffer's content and will cause an unspecified exception to be thrown either at the time of the access or at some later time.

I open a direct ByteBuffer, use it and close it , then, open it , use it ... until there is a NullPointerException after I open it and try to use it. What is the problem? Thank you for reply.
Best,
Damu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic