|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.vfs.util.MonitorRandomAccessContent
An RandomAccessContent that provides end-of-stream monitoring.
| Constructor Summary | |
MonitorRandomAccessContent(RandomAccessContent content)
|
|
| Method Summary | |
void |
close()
Closes this content. |
long |
getFilePointer()
Returns the current offset in this file. |
InputStream |
getInputStream()
get the input stream Notice: If you use seek(long) you have to reget the InputStream |
long |
length()
Returns the length of this file. |
protected void |
onClose()
Called after this stream is closed. |
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int off,
int len)
|
int |
readInt()
|
String |
readLine()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
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(String s)
|
void |
writeChar(int v)
|
void |
writeChars(String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(String str)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MonitorRandomAccessContent(RandomAccessContent content)
| Method Detail |
protected void onClose()
throws IOException
IOException
public void close()
throws IOException
close in interface RandomAccessContentIOException - if an I/O error occurs.
public long getFilePointer()
throws IOException
RandomAccessContent
getFilePointer in interface RandomAccessContentIOException - if an I/O error occurs.
public void seek(long pos)
throws IOException
RandomAccessContentRandomAccessContent.getInputStream() you have to reget the InputStream after calling RandomAccessContent.seek(long)
seek in interface RandomAccessContentpos - the offset position, measured in bytes from the
beginning of the file, at which to set the file
pointer.
IOException - if pos is less than
0 or if an I/O error occurs.
public long length()
throws IOException
RandomAccessContent
length in interface RandomAccessContentIOException - if an I/O error occurs.
public void write(int b)
throws IOException
write in interface DataOutputIOException
public void write(byte[] b)
throws IOException
write in interface DataOutputIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputIOException
public void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOException
public void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOException
public void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOException
public void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOException
public void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOException
public void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOException
public void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOException
public void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOException
public void writeBytes(String s)
throws IOException
writeBytes in interface DataOutputIOException
public void writeChars(String s)
throws IOException
writeChars in interface DataOutputIOException
public void writeUTF(String str)
throws IOException
writeUTF in interface DataOutputIOException
public void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOException
public void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOException
public int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOException
public boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOException
public byte readByte()
throws IOException
readByte in interface DataInputIOException
public int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOException
public short readShort()
throws IOException
readShort in interface DataInputIOException
public int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOException
public char readChar()
throws IOException
readChar in interface DataInputIOException
public int readInt()
throws IOException
readInt in interface DataInputIOException
public long readLong()
throws IOException
readLong in interface DataInputIOException
public float readFloat()
throws IOException
readFloat in interface DataInputIOException
public double readDouble()
throws IOException
readDouble in interface DataInputIOException
public String readLine()
throws IOException
readLine in interface DataInputIOException
public String readUTF()
throws IOException
readUTF in interface DataInputIOException
public InputStream getInputStream()
throws IOException
RandomAccessContentRandomAccessContent.seek(long) you have to reget the InputStream
getInputStream in interface RandomAccessContentIOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||