Package 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanbytereadByte()charreadChar()doublelongreadDoubleArray(int len, double[] varr) Reads the double array from the data input into the given dense block and returns the number of non-zeros.floatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()longreadLong()shortlongreadSparseRows(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.intintreadUTF()intskipBytes(int n) Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
FastBufferedDataInputStream
-
FastBufferedDataInputStream
-
-
Method Details
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readLine
- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
readDoubleArray
Description copied from interface:MatrixBlockDataInputReads the double array from the data input into the given dense block and returns the number of non-zeros.- Specified by:
readDoubleArrayin interfaceMatrixBlockDataInput- Parameters:
len- ?varr- ?- Returns:
- number of non-zeros
- Throws:
IOException- if IOException occurs
-
readSparseRows
Description copied from interface:MatrixBlockDataInputReads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.- Specified by:
readSparseRowsin interfaceMatrixBlockDataInput- Parameters:
rlen- number of rowsnnz- number of non-zerosrows- sparse block- Returns:
- number of non-zeros
- Throws:
IOException- if IOExcepton occurs
-