Class HdfsRandomAccessContent
java.lang.Object
org.apache.commons.vfs2.provider.AbstractRandomAccessContent
org.apache.commons.vfs2.provider.hdfs.HdfsRandomAccessContent
- All Implemented Interfaces:
- Closeable,- DataInput,- DataOutput,- AutoCloseable,- RandomAccessContent
Provides random access to content in an HdfsFileObject. Currently this only supports read operations. All write
 operations throw an 
UnsupportedOperationException.- Since:
- 2.1
- 
Constructor SummaryConstructorsConstructorDescriptionHdfsRandomAccessContent(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) Create random access content.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()longlonglength()booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()longreadLong()shortintintreadUTF()voidseek(long pos) voidsetLength(long newLength) intskipBytes(int n) Methods inherited from class org.apache.commons.vfs2.provider.AbstractRandomAccessContentwrite, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
- 
Constructor Details- 
HdfsRandomAccessContentpublic HdfsRandomAccessContent(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) throws IOException Create random access content.- Parameters:
- path- A Hadoop Path
- fs- A Hadoop FileSystem
- Throws:
- IOException- when the path cannot be processed.
 
 
- 
- 
Method Details- 
close- Throws:
- IOException
- See Also:
 
- 
getFilePointer- Throws:
- IOException
- See Also:
 
- 
getInputStream- Throws:
- IOException
- See Also:
 
- 
length- Throws:
- IOException
- See Also:
 
- 
readBoolean- Throws:
- IOException
- See Also:
 
- 
readByte- Throws:
- IOException
- See Also:
 
- 
readChar- Throws:
- IOException
- See Also:
 
- 
readDouble- Throws:
- IOException
- See Also:
 
- 
readFloat- Throws:
- IOException
- See Also:
 
- 
readFully- Throws:
- IOException
- See Also:
 
- 
readFully- Throws:
- IOException
- See Also:
 
- 
readInt- Throws:
- IOException
- See Also:
 
- 
readLine- Specified by:
- readLinein interface- DataInput
- Overrides:
- readLinein class- AbstractRandomAccessContent
- Throws:
- IOException
- See Also:
 
- 
readLong- Throws:
- IOException
- See Also:
 
- 
readShort- Throws:
- IOException
- See Also:
 
- 
readUnsignedByte- Throws:
- IOException
- See Also:
 
- 
readUnsignedShort- Throws:
- IOException
- See Also:
 
- 
readUTF- Throws:
- IOException
- See Also:
 
- 
seek- Throws:
- IOException
- See Also:
 
- 
setLength- Throws:
- IOException
- See Also:
 
- 
skipBytes- Throws:
- IOException
- See Also:
 
 
-