Class HDFSRandomAccessFile
java.lang.Object
ucar.unidata.io.RandomAccessFile
org.apache.sedona.core.formatMapper.netcdfParser.HDFSRandomAccessFile
- All Implemented Interfaces:
Closeable,DataInput,DataOutput,AutoCloseable,ucar.nc2.util.cache.FileCacheable
public class HDFSRandomAccessFile
extends ucar.unidata.io.RandomAccessFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.fs.Pathprotected org.apache.hadoop.fs.FileStatusprotected URIprotected org.apache.hadoop.fs.FSDataInputStreamFields inherited from class ucar.unidata.io.RandomAccessFile
allFiles, BIG_ENDIAN, bigEndian, buffer, bufferModified, bufferStart, dataEnd, dataSize, debugAccess, debugLeaks, defaultBufferSize, endOfFile, file, fileChannel, filePosition, LITTLE_ENDIAN, location, openFiles, readonly, showOpen, showRead -
Constructor Summary
ConstructorsConstructorDescriptionHDFSRandomAccessFile(String fileSystemURI, String location) HDFSRandomAccessFile(String fileSystemURI, String location, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()longlonglength()protected intread_(long pos, byte[] b, int offset, int len) longreadToByteChannel(WritableByteChannel dest, long offset, long nbytes) Methods inherited from class ucar.unidata.io.RandomAccessFile
acquire, acquire, eject, enableDefaultGlobalFileCache, getAllFiles, getBufferSize, getDebugLeaks, getDebugNbytes, getDebugNseeks, getFilePointer, getGlobalFileCache, getLocation, getMaxOpenFileCount, getOpenFileCount, getOpenFiles, getRandomAccessFile, isAtEndOfFile, isDirectory, order, order, reacquire, read, read, read, readBoolean, readBuffer, readByte, readBytes, readBytes, readChar, readDouble, readDouble, readFloat, readFloat, readFully, readFully, readInt, readInt, readIntUnbuffered, readLine, readLine, readLong, readLong, readShort, readShort, readString, readString, readStringMax, readStringMax, readUnsignedByte, readUnsignedShort, readUTF, release, searchForward, seek, setBufferSize, setDebugAccess, setDebugLeaks, setExtendMode, setFileCache, setGlobalFileCache, setMinLength, shutdown, skipBytes, skipBytes, toString, unread, write, write, write, writeBoolean, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeChar, writeChar, writeChar, writeChar, writeChar, writeChar, writeChars, writeChars, writeChars, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeInt, writeInt, writeInt, writeInt, writeInt, writeInt, writeLong, writeLong, writeLong, writeLong, writeLong, writeLong, writeShort, writeShort, writeShort, writeShort, writeShort, writeShort, writeUTF
-
Field Details
-
fsURI
-
filePath
protected org.apache.hadoop.fs.Path filePath -
hfile
protected org.apache.hadoop.fs.FSDataInputStream hfile -
fileStatus
protected org.apache.hadoop.fs.FileStatus fileStatus
-
-
Constructor Details
-
HDFSRandomAccessFile
- Throws:
IOException
-
HDFSRandomAccessFile
public HDFSRandomAccessFile(String fileSystemURI, String location, int bufferSize) throws IOException - Throws:
IOException
-
-
Method Details
-
flush
public void flush()- Overrides:
flushin classucar.unidata.io.RandomAccessFile
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceucar.nc2.util.cache.FileCacheable- Overrides:
closein classucar.unidata.io.RandomAccessFile- Throws:
IOException
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceucar.nc2.util.cache.FileCacheable- Overrides:
getLastModifiedin classucar.unidata.io.RandomAccessFile
-
length
- Overrides:
lengthin classucar.unidata.io.RandomAccessFile- Throws:
IOException
-
read_
- Overrides:
read_in classucar.unidata.io.RandomAccessFile- Throws:
IOException
-
readToByteChannel
public long readToByteChannel(WritableByteChannel dest, long offset, long nbytes) throws IOException - Overrides:
readToByteChannelin classucar.unidata.io.RandomAccessFile- Throws:
IOException
-