@Deprecated public class BufferedFileReadChannelImpl extends java.lang.Object implements FileReadChannel
Constructor and Description |
---|
BufferedFileReadChannelImpl(FileReadChannel readChannel,
int bufferSize)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
boolean |
isOpen()
Deprecated.
|
long |
position()
Deprecated.
Returns this channel's file position;
|
FileReadChannel |
position(long newPosition)
Deprecated.
Sets this channel's file position.
|
int |
read(java.nio.ByteBuffer dst)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
public BufferedFileReadChannelImpl(FileReadChannel readChannel, int bufferSize)
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
java.io.IOException
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
public long position() throws java.io.IOException
FileReadChannel
position
in interface FileReadChannel
java.io.IOException
- If any problem occurspublic FileReadChannel position(long newPosition) throws java.io.IOException
FileReadChannel
Setting 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 FileReadChannel
newPosition
- The new position, a non-negative integer counting the
number of bytes from the beginning of the filejava.io.IOException
- If any other problem occurspublic java.lang.String toString()
toString
in class java.lang.Object