Class ListStringInputFormat
- java.lang.Object
-
- org.datavec.api.formats.input.impl.ListStringInputFormat
-
- All Implemented Interfaces:
Serializable,InputFormat,Writable
public class ListStringInputFormat extends Object implements InputFormat
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ListStringInputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordReadercreateReader(InputSplit split)Creates a reader from an input splitRecordReadercreateReader(InputSplit split, Configuration conf)Creates a reader from an input splitWritableTypegetType()Get the type of the writable.voidreadFields(DataInput in)Deserialize the fields of this object fromin.doubletoDouble()Convert Writable to double.floattoFloat()Convert Writable to float.inttoInt()Convert Writable to int.longtoLong()Convert Writable to long.voidwrite(DataOutput out)Serialize the fields of this object toout.voidwriteType(DataOutput out)Write the type (a single short value) to the DataOutput.
-
-
-
Method Detail
-
createReader
public RecordReader createReader(InputSplit split, Configuration conf) throws IOException, InterruptedException
Creates a reader from an input split- Specified by:
createReaderin interfaceInputFormat- Parameters:
split- the split to readconf-- Returns:
- the reader from the given input split
- Throws:
IOExceptionInterruptedException
-
createReader
public RecordReader createReader(InputSplit split) throws IOException, InterruptedException
Creates a reader from an input split- Specified by:
createReaderin interfaceInputFormat- Parameters:
split- the split to read- Returns:
- the reader from the given input split
- Throws:
IOExceptionInterruptedException
-
write
public void write(DataOutput out) throws IOException
Serialize the fields of this object toout.- Specified by:
writein interfaceWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException
-
readFields
public void readFields(DataInput in) throws IOException
Deserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException
-
toDouble
public double toDouble()
Convert Writable to double. Whether this is supported depends on the specific writable.
-
toFloat
public float toFloat()
Convert Writable to float. Whether this is supported depends on the specific writable.
-
toInt
public int toInt()
Convert Writable to int. Whether this is supported depends on the specific writable.
-
toLong
public long toLong()
Convert Writable to long. Whether this is supported depends on the specific writable.
-
getType
public WritableType getType()
Description copied from interface:WritableGet the type of the writable.
-
writeType
public void writeType(DataOutput out) throws IOException
Description copied from interface:WritableWrite the type (a single short value) to the DataOutput. SeeWritableFactoryfor details.- Specified by:
writeTypein interfaceWritable- Parameters:
out- DataOutput to write to- Throws:
IOException- For errors during writing
-
-