public class TextualVectorWriter extends Object implements VectorWriter
Writer using Vector.asFormatString(),
one per line by default.| Constructor and Description |
|---|
TextualVectorWriter(Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Writer |
getWriter() |
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. |
void |
write(Vector vector)
Write out a vector
|
public TextualVectorWriter(Writer writer)
protected Writer getWriter()
public long write(Iterable<Vector> iterable) throws IOException
VectorWriterwrite in interface VectorWriteriterable - The Iterable to loop overIOException - if there was a problem writingpublic long write(Iterable<Vector> iterable, long maxDocs) throws IOException
VectorWritermaxDocs to the output.write in interface VectorWriteriterable - The Iterable to loop overmaxDocs - the maximum number of docs to writeIOException - if there was a problem writingpublic void write(Vector vector) throws IOException
VectorWriterwrite in interface VectorWritervector - The Vector to writeIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2008–2013 The Apache Software Foundation. All rights reserved.