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

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.hadoop.fs.Path
     
    protected org.apache.hadoop.fs.FileStatus
     
    protected URI
     
    protected org.apache.hadoop.fs.FSDataInputStream
     

    Fields 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

    Constructors
    Constructor
    Description
    HDFSRandomAccessFile(String fileSystemURI, String location)
     
    HDFSRandomAccessFile(String fileSystemURI, String location, int bufferSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    long
     
    long
     
    protected int
    read_(long pos, byte[] b, int offset, int len)
     
    long
    readToByteChannel(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • fsURI

      protected URI 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

  • Method Details

    • flush

      public void flush()
      Overrides:
      flush in class ucar.unidata.io.RandomAccessFile
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface ucar.nc2.util.cache.FileCacheable
      Overrides:
      close in class ucar.unidata.io.RandomAccessFile
      Throws:
      IOException
    • getLastModified

      public long getLastModified()
      Specified by:
      getLastModified in interface ucar.nc2.util.cache.FileCacheable
      Overrides:
      getLastModified in class ucar.unidata.io.RandomAccessFile
    • length

      public long length() throws IOException
      Overrides:
      length in class ucar.unidata.io.RandomAccessFile
      Throws:
      IOException
    • read_

      protected int read_(long pos, byte[] b, int offset, int len) throws IOException
      Overrides:
      read_ in class ucar.unidata.io.RandomAccessFile
      Throws:
      IOException
    • readToByteChannel

      public long readToByteChannel(WritableByteChannel dest, long offset, long nbytes) throws IOException
      Overrides:
      readToByteChannel in class ucar.unidata.io.RandomAccessFile
      Throws:
      IOException