com.github.junrar.io
Class ReadOnlyAccessFile
java.lang.Object
java.io.RandomAccessFile
com.github.junrar.io.ReadOnlyAccessFile
- All Implemented Interfaces:
- IReadOnlyAccess, Closeable, DataInput, DataOutput
public class ReadOnlyAccessFile
- extends RandomAccessFile
- implements IReadOnlyAccess
DOCUMENT ME
- Version:
- $LastChangedRevision$
- Author:
- $LastChangedBy$
| Methods inherited from class java.io.RandomAccessFile |
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, writeUTF |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyAccessFile
public ReadOnlyAccessFile(File file)
throws FileNotFoundException
- Parameters:
file - the file
- Throws:
FileNotFoundException
readFully
public int readFully(byte[] buffer,
int count)
throws IOException
- Description copied from interface:
IReadOnlyAccess
- Read exactly count bytes to the specified buffer.
- Specified by:
readFully in interface IReadOnlyAccess
- Parameters:
buffer - where to store the read datacount - how many bytes to read
- Returns:
- bytes read || -1 if IO problem
- Throws:
IOException
getPosition
public long getPosition()
throws IOException
- Specified by:
getPosition in interface IReadOnlyAccess
- Returns:
- the current position in the file
- Throws:
IOException
setPosition
public void setPosition(long pos)
throws IOException
- Specified by:
setPosition in interface IReadOnlyAccess
- Parameters:
pos - the position in the file
- Throws:
IOException
Copyright © 2012. All Rights Reserved.