org.apache.sysds.runtime.io

## Class FrameReader

- java.lang.Object
- - org.apache.sysds.runtime.io.FrameReader

Direct Known Subclasses:
  FrameReaderBinaryBlock, FrameReaderProto, FrameReaderTextCell, FrameReaderTextCSV

    public abstract class FrameReader
    extends Object

Base class for all format-specific frame readers. Every reader is required to implement the basic read functionality but might provide additional custom functionality. Any non-default parameters (e.g., CSV read properties) should be passed into custom constructors. There is also a factory for creating format-specific readers.

### Constructor Summary

Constructors
Constructor and Description
`FrameReader()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`String[]` `getDefColNames(long clen)`
`Types.ValueType[]` `getDefSchema(long clen)`
`FrameBlock` `readFrameFromHDFS(String fname, long rlen, long clen)`
`FrameBlock` `readFrameFromHDFS(String fname, Types.ValueType[] schema, long rlen, long clen)`
`abstract FrameBlock` `readFrameFromHDFS(String fname, Types.ValueType[] schema, String[] names, long rlen, long clen)`
`FrameBlock` `readFrameFromInputStream(InputStream is, long rlen, long clen)`
`FrameBlock` `readFrameFromInputStream(InputStream is, Types.ValueType[] schema, long rlen, long clen)`
`abstract FrameBlock` `readFrameFromInputStream(InputStream is, Types.ValueType[] schema, String[] names, long rlen, long clen)`

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

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

### Constructor Detail

#### FrameReader

    public FrameReader()

### Method Detail

#### readFrameFromHDFS

    public abstract FrameBlock readFrameFromHDFS(String fname,
                                                 Types.ValueType[] schema,
                                                 String[] names,
                                                 long rlen,
                                                 long clen)
                                          throws IOException,
                                                 DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readFrameFromHDFS

    public FrameBlock readFrameFromHDFS(String fname,
                                        Types.ValueType[] schema,
                                        long rlen,
                                        long clen)
                                 throws IOException,
                                        DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readFrameFromHDFS

    public FrameBlock readFrameFromHDFS(String fname,
                                        long rlen,
                                        long clen)
                                 throws IOException,
                                        DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readFrameFromInputStream

    public abstract FrameBlock readFrameFromInputStream(InputStream is,
                                                        Types.ValueType[] schema,
                                                        String[] names,
                                                        long rlen,
                                                        long clen)
                                                 throws IOException,
                                                        DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readFrameFromInputStream

    public FrameBlock readFrameFromInputStream(InputStream is,
                                               Types.ValueType[] schema,
                                               long rlen,
                                               long clen)
                                        throws IOException,
                                               DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readFrameFromInputStream

    public FrameBlock readFrameFromInputStream(InputStream is,
                                               long rlen,
                                               long clen)
                                        throws IOException,
                                               DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### getDefSchema

    public Types.ValueType[] getDefSchema(long clen)
                                   throws DMLRuntimeException

Throws:
  `DMLRuntimeException`

#### getDefColNames

    public String[] getDefColNames(long clen)
                            throws DMLRuntimeException

Throws:
  `DMLRuntimeException`