org.apache.accumulo.start.classloader.vfs.providers
Class HdfsRandomAccessContent
java.lang.Object
org.apache.accumulo.start.classloader.vfs.providers.HdfsRandomAccessContent
- All Implemented Interfaces:
- DataInput, DataOutput, org.apache.commons.vfs2.RandomAccessContent
public class HdfsRandomAccessContent
- extends Object
- implements org.apache.commons.vfs2.RandomAccessContent
Provides random access to content in an HdfsFileObject. Currently this only supports read operations. All write operations throw an
UnsupportedOperationException
.
- Since:
- 2.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HdfsRandomAccessContent
public HdfsRandomAccessContent(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs)
throws IOException
- Parameters:
path
- A Hadoop Pathfs
- A Hadoop FileSystem
- Throws:
IOException
- when the path cannot be processed.
close
public void close()
throws IOException
- Specified by:
close
in interface org.apache.commons.vfs2.RandomAccessContent
- Throws:
IOException
- See Also:
RandomAccessContent.close()
getFilePointer
public long getFilePointer()
throws IOException
- Specified by:
getFilePointer
in interface org.apache.commons.vfs2.RandomAccessContent
- Throws:
IOException
- See Also:
RandomAccessContent.getFilePointer()
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream
in interface org.apache.commons.vfs2.RandomAccessContent
- Throws:
IOException
- See Also:
RandomAccessContent.getInputStream()
length
public long length()
throws IOException
- Specified by:
length
in interface org.apache.commons.vfs2.RandomAccessContent
- Throws:
IOException
- See Also:
RandomAccessContent.length()
readBoolean
public boolean readBoolean()
throws IOException
- Specified by:
readBoolean
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readBoolean()
readByte
public byte readByte()
throws IOException
- Specified by:
readByte
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readByte()
readChar
public char readChar()
throws IOException
- Specified by:
readChar
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readChar()
readDouble
public double readDouble()
throws IOException
- Specified by:
readDouble
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readDouble()
readFloat
public float readFloat()
throws IOException
- Specified by:
readFloat
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readFloat()
readFully
public void readFully(byte[] b)
throws IOException
- Specified by:
readFully
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readFully(byte[])
readFully
public void readFully(byte[] b,
int off,
int len)
throws IOException
- Specified by:
readFully
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readFully(byte[], int, int)
readInt
public int readInt()
throws IOException
- Specified by:
readInt
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readInt()
readLine
public String readLine()
throws IOException
- Specified by:
readLine
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readLine()
readLong
public long readLong()
throws IOException
- Specified by:
readLong
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readLong()
readShort
public short readShort()
throws IOException
- Specified by:
readShort
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readShort()
readUnsignedByte
public int readUnsignedByte()
throws IOException
- Specified by:
readUnsignedByte
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readUnsignedByte()
readUnsignedShort
public int readUnsignedShort()
throws IOException
- Specified by:
readUnsignedShort
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readUnsignedShort()
readUTF
public String readUTF()
throws IOException
- Specified by:
readUTF
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.readUTF()
seek
public void seek(long pos)
throws IOException
- Specified by:
seek
in interface org.apache.commons.vfs2.RandomAccessContent
- Throws:
IOException
- See Also:
RandomAccessContent.seek(long)
skipBytes
public int skipBytes(int n)
throws IOException
- Specified by:
skipBytes
in interface DataInput
- Throws:
IOException
- See Also:
DataInput.skipBytes(int)
write
public void write(byte[] b)
throws IOException
- Specified by:
write
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.write(byte[])
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Specified by:
write
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.write(byte[], int, int)
write
public void write(int b)
throws IOException
- Specified by:
write
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.write(int)
writeBoolean
public void writeBoolean(boolean v)
throws IOException
- Specified by:
writeBoolean
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeBoolean(boolean)
writeByte
public void writeByte(int v)
throws IOException
- Specified by:
writeByte
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeByte(int)
writeBytes
public void writeBytes(String s)
throws IOException
- Specified by:
writeBytes
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeBytes(java.lang.String)
writeChar
public void writeChar(int v)
throws IOException
- Specified by:
writeChar
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeChar(int)
writeChars
public void writeChars(String s)
throws IOException
- Specified by:
writeChars
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeChars(java.lang.String)
writeDouble
public void writeDouble(double v)
throws IOException
- Specified by:
writeDouble
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeDouble(double)
writeFloat
public void writeFloat(float v)
throws IOException
- Specified by:
writeFloat
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeFloat(float)
writeInt
public void writeInt(int v)
throws IOException
- Specified by:
writeInt
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeInt(int)
writeLong
public void writeLong(long v)
throws IOException
- Specified by:
writeLong
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeLong(long)
writeShort
public void writeShort(int v)
throws IOException
- Specified by:
writeShort
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeShort(int)
writeUTF
public void writeUTF(String s)
throws IOException
- Specified by:
writeUTF
in interface DataOutput
- Throws:
IOException
- See Also:
DataOutput.writeUTF(java.lang.String)
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.