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

      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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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, validatePositionedReadArgs`

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

      `available, mark, markSupported, read, reset, skip`

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

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

- - ### Method Detail

    - #### 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 class `org.apache.hadoop.fs.FSInputStream`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `InputStream`
      Throws:
        `IOException`

    - #### setFileLength

          public void setFileLength(long len)

    - #### getFileLength

          public long getFileLength()

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.