This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes method ByteBuffer.rewind() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "method ByteBuffer.rewind()" Watch "method ByteBuffer.rewind()" New topic

method ByteBuffer.rewind()

henry akoma

Joined: May 17, 2005
Posts: 21
reading thru "thinking in java, 3rd ed." by bruce eckel, i came across this code in the New I/O topic, section on Converting data:

ByteBuffer buff=ByteBuffer.allocate(1024);

i have checked the java API and i could not find the method ByteBuffer.rewind().please, can anyone help me with the function of this method.

akoma henry
Joe Ess

Joined: Oct 29, 2001
Posts: 8834

One fundamental concept of object-oriented programming is that a subclass inherits functionality from its superclass. If you look at the API doc for java.nio.ByteBuffer, you'll see that it extends java.nio.Buffer. If you scroll past the Method Summary to the section titled "Methods inherited from class java.nio.Buffer" you'll see that rewind is declared in Buffer, with a handy link to the method documentation.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: method ByteBuffer.rewind()
Similar Threads
How to check given field whether primitive or user defined
Forcing Input With The Scanner Class
HashMap problem
JSP problem.
Generic Interfaces