org.apache.sysds.runtime.util

## Class FastBufferedDataInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - org.apache.sysds.runtime.util.FastBufferedDataInputStream

- All Implemented Interfaces:
    Closeable, DataInput, AutoCloseable, MatrixBlockDataInput

      public class FastBufferedDataInputStream
      extends FilterInputStream
      implements DataInput, MatrixBlockDataInput

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FastBufferedDataInputStream(InputStream in)`
    `FastBufferedDataInputStream(InputStream in, int size)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `readBoolean()`
    `byte` | `readByte()`
    `char` | `readChar()`
    `double` | `readDouble()`
    `long` | `readDoubleArray(int len, double[] varr)` Reads the double array from the data input into the given dense block and returns the number of non-zeros.
    `float` | `readFloat()`
    `void` | `readFully(byte[] b)`
    `void` | `readFully(byte[] b, int off, int len)`
    `int` | `readInt()`
    `String` | `readLine()`
    `long` | `readLong()`
    `short` | `readShort()`
    `long` | `readSparseRows(int rlen, long nnz, SparseBlock rows)` Reads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.
    `int` | `readUnsignedByte()`
    `int` | `readUnsignedShort()`
    `String` | `readUTF()`
    `int` | `skipBytes(int n)`

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

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

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

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

- - ### Constructor Detail

    - #### FastBufferedDataInputStream

          public FastBufferedDataInputStream(InputStream in)

    - #### FastBufferedDataInputStream

          public FastBufferedDataInputStream(InputStream in,
                                             int size)

  - ### Method Detail

    - #### readFully

          public void readFully(byte[] b)
                         throws IOException

      Specified by:
        `readFully` in interface `DataInput`
      Throws:
        `IOException`

    - #### readFully

          public void readFully(byte[] b,
                                int off,
                                int len)
                         throws IOException

      Specified by:
        `readFully` in interface `DataInput`
      Throws:
        `IOException`

    - #### skipBytes

          public int skipBytes(int n)
                        throws IOException

      Specified by:
        `skipBytes` in interface `DataInput`
      Throws:
        `IOException`

    - #### readBoolean

          public boolean readBoolean()
                              throws IOException

      Specified by:
        `readBoolean` in interface `DataInput`
      Throws:
        `IOException`

    - #### readByte

          public byte readByte()
                        throws IOException

      Specified by:
        `readByte` in interface `DataInput`
      Throws:
        `IOException`

    - #### readUnsignedByte

          public int readUnsignedByte()
                               throws IOException

      Specified by:
        `readUnsignedByte` in interface `DataInput`
      Throws:
        `IOException`

    - #### readShort

          public short readShort()
                          throws IOException

      Specified by:
        `readShort` in interface `DataInput`
      Throws:
        `IOException`

    - #### readUnsignedShort

          public int readUnsignedShort()
                                throws IOException

      Specified by:
        `readUnsignedShort` in interface `DataInput`
      Throws:
        `IOException`

    - #### readChar

          public char readChar()
                        throws IOException

      Specified by:
        `readChar` in interface `DataInput`
      Throws:
        `IOException`

    - #### readInt

          public int readInt()
                      throws IOException

      Specified by:
        `readInt` in interface `DataInput`
      Throws:
        `IOException`

    - #### readLong

          public long readLong()
                        throws IOException

      Specified by:
        `readLong` in interface `DataInput`
      Throws:
        `IOException`

    - #### readFloat

          public float readFloat()
                          throws IOException

      Specified by:
        `readFloat` in interface `DataInput`
      Throws:
        `IOException`

    - #### readDouble

          public double readDouble()
                            throws IOException

      Specified by:
        `readDouble` in interface `DataInput`
      Throws:
        `IOException`

    - #### readLine

          public String readLine()
                          throws IOException

      Specified by:
        `readLine` in interface `DataInput`
      Throws:
        `IOException`

    - #### readUTF

          public String readUTF()
                         throws IOException

      Specified by:
        `readUTF` in interface `DataInput`
      Throws:
        `IOException`

    - #### readDoubleArray

          public long readDoubleArray(int len,
                                      double[] varr)
                               throws IOException

      Description copied from interface: `MatrixBlockDataInput`
      Reads the double array from the data input into the given dense block and returns the number of non-zeros.
      Specified by:
        `readDoubleArray` in interface `MatrixBlockDataInput`
      Parameters:
        `len` - ?
        `varr` - ?
      Returns:
        number of non-zeros
      Throws:
        `IOException` - if IOException occurs

    - #### readSparseRows

          public long readSparseRows(int rlen,
                                     long nnz,
                                     SparseBlock rows)
                              throws IOException

      Description copied from interface: `MatrixBlockDataInput`
      Reads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.
      Specified by:
        `readSparseRows` in interface `MatrixBlockDataInput`
      Parameters:
        `rlen` - number of rows
        `nnz` - number of non-zeros
        `rows` - sparse block
      Returns:
        number of non-zeros
      Throws:
        `IOException` - if IOExcepton occurs

Copyright © 2021 The Apache Software Foundation. All rights reserved.