WebHdfsFileSystem.WebHdfsInputStream (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.web, class: WebHdfsFileSystem, class: WebHdfsInputStream

Package org.apache.hadoop.hdfs.web

# Class WebHdfsFileSystem.WebHdfsInputStream

java.lang.Object
java.io.InputStream
org.apache.hadoop.fs.FSInputStream
org.apache.hadoop.hdfs.web.WebHdfsFileSystem.WebHdfsInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `org.apache.hadoop.fs.PositionedReadable`, `org.apache.hadoop.fs.Seekable`

Enclosing class:
  WebHdfsFileSystem

@VisibleForTesting public class WebHdfsFileSystem.WebHdfsInputStream extends org.apache.hadoop.fs.FSInputStream
This class is used for opening, reading, and seeking files while using the WebHdfsFileSystem. This class will invoke the retry policy when performing any of these actions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `protected int`
  `getBufferSize()`
  `long`
  `getFileLength()`
  `protected org.apache.hadoop.fs.Path`
  `getPath()`
  `long`
  `getPos()`
  `int`
  `read()`
  `int`
  `read(byte[] b, int off, int len)`
  `void`
  `seek(long newPos)`
  `boolean`
  `seekToNewSource(long targetPos)`
  `void`
  `setFileLength(long len)`

  ### Methods inherited from class org.apache.hadoop.fs.FSInputStream

  `read, readFully, readFully, toString, validatePositionedReadArgs`

  ### Methods inherited from class java.io.InputStream

  `available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.apache.hadoop.fs.PositionedReadable

  `maxReadSizeForVectorReads, minSeekForVectorReads, readVectored, readVectored`

- ## Method Details

  - ### read

    public int read() throws IOException
    Specified by:
      `read` in class `InputStream`
    Throws:
      `IOException`

  - ### read

    public int read(byte[] b, int off, int len) throws IOException
    Overrides:
      `read` in class `InputStream`
    Throws:
      `IOException`

  - ### seek

    public void seek(long newPos) throws IOException
    Specified by:
      `seek` in interface `org.apache.hadoop.fs.Seekable`
    Specified by:
      `seek` in class `org.apache.hadoop.fs.FSInputStream`
    Throws:
      `IOException`

  - ### getPos

    public long getPos() throws IOException
    Specified by:
      `getPos` in interface `org.apache.hadoop.fs.Seekable`
    Specified by:
      `getPos` in class `org.apache.hadoop.fs.FSInputStream`
    Throws:
      `IOException`

  - ### getBufferSize

    protected int getBufferSize() throws IOException
    Throws:
      `IOException`

  - ### getPath

    protected org.apache.hadoop.fs.Path getPath() throws IOException
    Throws:
      `IOException`

  - ### seekToNewSource

    public boolean seekToNewSource(long targetPos) throws IOException
    Specified by:
      `seekToNewSource` in interface `org.apache.hadoop.fs.Seekable`
    Specified by:
      `seekToNewSource` in class `org.apache.hadoop.fs.FSInputStream`
    Throws:
      `IOException`

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `InputStream`
    Throws:
      `IOException`

  - ### setFileLength

    public void setFileLength(long len)

  - ### getFileLength

    public long getFileLength()