public class ReadOnlyAccessFile extends RandomAccessFile implements IReadOnlyAccess
| Constructor and Description |
|---|
ReadOnlyAccessFile(File file)
Creates object
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition() |
int |
readFully(byte[] buffer,
int count)
Read exactly count bytes to the specified buffer.
|
void |
setPosition(long pos) |
close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, read, readpublic ReadOnlyAccessFile(File file) throws FileNotFoundException
file - the fileFileNotFoundException - if file not foundpublic int readFully(byte[] buffer,
int count)
throws IOException
IReadOnlyAccessreadFully in interface IReadOnlyAccessbuffer - where to store the read datacount - how many bytes to readIOExceptionpublic long getPosition()
throws IOException
getPosition in interface IReadOnlyAccessIOExceptionpublic void setPosition(long pos)
throws IOException
setPosition in interface IReadOnlyAccesspos - the position in the fileIOExceptionCopyright © 2017. All rights reserved.