|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.provider.AbstractRandomAccessContent
org.apache.commons.vfs.provider.local.LocalFileRandomAccessContent
class LocalFileRandomAccessContent
RandomAccess for local files
Field Summary | |
---|---|
private java.io.RandomAccessFile |
raf
|
private java.io.InputStream |
rafis
|
Constructor Summary | |
---|---|
LocalFileRandomAccessContent(java.io.File localFile,
RandomAccessMode mode)
|
Method Summary | |
---|---|
void |
close()
Closes this random access file stream and releases any system resources associated with the stream. |
long |
getFilePointer()
Returns the current offset in this file. |
java.io.InputStream |
getInputStream()
get the input stream Notice: If you use RandomAccessContent.seek(long) you have to reget the InputStream |
long |
length()
Returns the length of this file. |
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int off,
int len)
|
int |
readInt()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
java.lang.String |
readUTF()
|
void |
seek(long pos)
Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs. |
int |
skipBytes(int n)
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(java.lang.String s)
|
void |
writeChar(int v)
|
void |
writeChars(java.lang.String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(java.lang.String str)
|
Methods inherited from class org.apache.commons.vfs.provider.AbstractRandomAccessContent |
---|
readLine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.io.RandomAccessFile raf
private final java.io.InputStream rafis
Constructor Detail |
---|
LocalFileRandomAccessContent(java.io.File localFile, RandomAccessMode mode) throws FileSystemException
FileSystemException
Method Detail |
---|
public long getFilePointer() throws java.io.IOException
RandomAccessContent
java.io.IOException
- if an I/O error occurs.public void seek(long pos) throws java.io.IOException
RandomAccessContent
RandomAccessContent.getInputStream()
you have to reget the InputStream after calling RandomAccessContent.seek(long)
pos
- the offset position, measured in bytes from the
beginning of the file, at which to set the file
pointer.
java.io.IOException
- if pos
is less than
0
or if an I/O error occurs.public long length() throws java.io.IOException
RandomAccessContent
java.io.IOException
- if an I/O error occurs.public void close() throws java.io.IOException
RandomAccessContent
If this file has an associated channel then the channel is closed as well.
java.io.IOException
- if an I/O error occurs.public byte readByte() throws java.io.IOException
java.io.IOException
public char readChar() throws java.io.IOException
java.io.IOException
public double readDouble() throws java.io.IOException
java.io.IOException
public float readFloat() throws java.io.IOException
java.io.IOException
public int readInt() throws java.io.IOException
java.io.IOException
public int readUnsignedByte() throws java.io.IOException
java.io.IOException
public int readUnsignedShort() throws java.io.IOException
java.io.IOException
public long readLong() throws java.io.IOException
java.io.IOException
public short readShort() throws java.io.IOException
java.io.IOException
public boolean readBoolean() throws java.io.IOException
java.io.IOException
public int skipBytes(int n) throws java.io.IOException
java.io.IOException
public void readFully(byte[] b) throws java.io.IOException
java.io.IOException
public void readFully(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public java.lang.String readUTF() throws java.io.IOException
java.io.IOException
public void writeDouble(double v) throws java.io.IOException
writeDouble
in interface java.io.DataOutput
writeDouble
in class AbstractRandomAccessContent
java.io.IOException
public void writeFloat(float v) throws java.io.IOException
writeFloat
in interface java.io.DataOutput
writeFloat
in class AbstractRandomAccessContent
java.io.IOException
public void write(int b) throws java.io.IOException
write
in interface java.io.DataOutput
write
in class AbstractRandomAccessContent
java.io.IOException
public void writeByte(int v) throws java.io.IOException
writeByte
in interface java.io.DataOutput
writeByte
in class AbstractRandomAccessContent
java.io.IOException
public void writeChar(int v) throws java.io.IOException
writeChar
in interface java.io.DataOutput
writeChar
in class AbstractRandomAccessContent
java.io.IOException
public void writeInt(int v) throws java.io.IOException
writeInt
in interface java.io.DataOutput
writeInt
in class AbstractRandomAccessContent
java.io.IOException
public void writeShort(int v) throws java.io.IOException
writeShort
in interface java.io.DataOutput
writeShort
in class AbstractRandomAccessContent
java.io.IOException
public void writeLong(long v) throws java.io.IOException
writeLong
in interface java.io.DataOutput
writeLong
in class AbstractRandomAccessContent
java.io.IOException
public void writeBoolean(boolean v) throws java.io.IOException
writeBoolean
in interface java.io.DataOutput
writeBoolean
in class AbstractRandomAccessContent
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in interface java.io.DataOutput
write
in class AbstractRandomAccessContent
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in interface java.io.DataOutput
write
in class AbstractRandomAccessContent
java.io.IOException
public void writeBytes(java.lang.String s) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
writeBytes
in class AbstractRandomAccessContent
java.io.IOException
public void writeChars(java.lang.String s) throws java.io.IOException
writeChars
in interface java.io.DataOutput
writeChars
in class AbstractRandomAccessContent
java.io.IOException
public void writeUTF(java.lang.String str) throws java.io.IOException
writeUTF
in interface java.io.DataOutput
writeUTF
in class AbstractRandomAccessContent
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
RandomAccessContent
RandomAccessContent.seek(long)
you have to reget the InputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |