public class AutoFileChannelWrapper extends Object implements SeekableByteChannel, AutoResource
| Constructor and Description |
|---|
AutoFileChannelWrapper(File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
int |
read(ByteBuffer arg0) |
void |
setCurTime(long curTime) |
SeekableByteChannel |
setPosition(long newPosition) |
long |
size() |
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer arg0) |
public AutoFileChannelWrapper(File file) throws IOException
IOExceptionpublic int read(ByteBuffer arg0) throws IOException
read in interface ReadableByteChannelIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic int write(ByteBuffer arg0) throws IOException
write in interface WritableByteChannelIOExceptionpublic long position()
throws IOException
position in interface SeekableByteChannelIOExceptionpublic SeekableByteChannel setPosition(long newPosition) throws IOException
setPosition in interface SeekableByteChannelIOExceptionpublic long size()
throws IOException
size in interface SeekableByteChannelIOExceptionpublic SeekableByteChannel truncate(long size) throws IOException
truncate in interface SeekableByteChannelIOExceptionpublic void setCurTime(long curTime)
setCurTime in interface AutoResourceCopyright © 2019. All rights reserved.