Package org.apache.commons.vfs2.provider
Class AbstractRandomAccessStreamContent
java.lang.Object
org.apache.commons.vfs2.provider.AbstractRandomAccessContent
org.apache.commons.vfs2.provider.AbstractRandomAccessStreamContent
- All Implemented Interfaces:
- Closeable,- DataInput,- DataOutput,- AutoCloseable,- RandomAccessContent
Implements the part usable for all stream-based random access.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructs a new instance for subclasses.
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract DataInputStreamGets a DataInputStream.Gets the input stream.booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()longreadLong()shortintintreadUTF()voidsetLength(long newLength) Sets the length of this content.intskipBytes(int n) Methods inherited from class org.apache.commons.vfs2.provider.AbstractRandomAccessContentreadLine, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.RandomAccessContentclose, getFilePointer, length, seek
- 
Constructor Details- 
AbstractRandomAccessStreamContentConstructs a new instance for subclasses.- Parameters:
- mode- the RandomAccessMode.
 
 
- 
- 
Method Details- 
getDataInputStreamGets a DataInputStream.- Returns:
- a DataInputStream.
- Throws:
- IOException- if an IO error occurs.
 
- 
getInputStreamDescription copied from interface:RandomAccessContentGets the input stream.Notice: If you use RandomAccessContent.seek(long)you have to re-get the InputStream- Returns:
- the InputStream.
- Throws:
- IOException- if an I/O error occurs.
 
- 
readBoolean- Throws:
- IOException
 
- 
readByte- Throws:
- IOException
 
- 
readChar- Throws:
- IOException
 
- 
readDouble- Throws:
- IOException
 
- 
readFloat- Throws:
- IOException
 
- 
readFully- Throws:
- IOException
 
- 
readFully- Throws:
- IOException
 
- 
readInt- Throws:
- IOException
 
- 
readLong- Throws:
- IOException
 
- 
readShort- Throws:
- IOException
 
- 
readUnsignedByte- Throws:
- IOException
 
- 
readUnsignedShort- Throws:
- IOException
 
- 
readUTF- Throws:
- IOException
 
- 
setLengthDescription copied from interface:RandomAccessContentSets the length of this content.If the newLengthargument is smaller thanRandomAccessContent.length(), the content is truncated.If the newLengthargument is greater thanRandomAccessContent.length(), the content grows with undefined data.- Parameters:
- newLength- The desired content length
- Throws:
- IOException- If an I/O error occurs
 
- 
skipBytes- Throws:
- IOException
 
 
-