|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.appengine.api.files.BufferedFileReadChannelImpl
public class BufferedFileReadChannelImpl
Wraps a FileReadChannel to provide buffering of reads.
| Constructor Summary | |
|---|---|
BufferedFileReadChannelImpl(FileReadChannel readChannel,
int bufferSize)
|
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
isOpen()
|
long |
position()
Returns this channel's file position; |
FileReadChannel |
position(long newPosition)
Sets this channel's file position. |
int |
read(java.nio.ByteBuffer dst)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BufferedFileReadChannelImpl(FileReadChannel readChannel,
int bufferSize)
| Method Detail |
|---|
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channel
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.nio.channels.Channeljava.io.IOException
public long position()
throws java.io.IOException
FileReadChannel
position in interface FileReadChanneljava.io.IOException - If any problem occurs
public FileReadChannel position(long newPosition)
throws java.io.IOException
FileReadChannelSetting the position to a value that is greater than the file's size will not result in an exception. A later attempt to read bytes at such a position will immediately return an end-of-file indication.
position in interface FileReadChannelnewPosition - The new position, a non-negative integer counting the
number of bytes from the beginning of the file
java.io.IOException - If any other problem occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||