org.apache.mahout.utils.vectors.io
Class JWriterVectorWriter
java.lang.Object
org.apache.mahout.utils.vectors.io.JWriterVectorWriter
- All Implemented Interfaces:
- VectorWriter
public class JWriterVectorWriter
- extends Object
- implements VectorWriter
Method Summary |
void |
close()
Close any internally held resources. |
long |
write(Iterable<Vector> iterable)
Write all values in the Iterable to the output |
long |
write(Iterable<Vector> iterable,
long maxDocs)
Write the first maxDocs to the output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JWriterVectorWriter
public JWriterVectorWriter(Writer writer)
write
public long write(Iterable<Vector> iterable)
throws IOException
- Description copied from interface:
VectorWriter
- Write all values in the Iterable to the output
- Specified by:
write
in interface VectorWriter
- Returns:
- the number of docs written
- Throws:
IOException
- if there was a problem writing
write
public long write(Iterable<Vector> iterable,
long maxDocs)
throws IOException
- Description copied from interface:
VectorWriter
- Write the first
maxDocs
to the output.
- Specified by:
write
in interface VectorWriter
maxDocs
- the maximum number of docs to write
- Returns:
- The number of docs written
- Throws:
IOException
- if there was a problem writing
close
public void close()
throws IOException
- Description copied from interface:
VectorWriter
- Close any internally held resources. If external Writers are passed in, the implementation should indicate
whether it also closes them
- Specified by:
close
in interface VectorWriter
- Throws:
IOException
- if there was an issue closing the item
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.