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
VectorWriter
write
in interface VectorWriter
iterable
- The Iterable
to loop overIOException
- if there was a problem writingpublic long write(Iterable<Vector> iterable, long maxDocs) throws IOException
VectorWriter
maxDocs
to the output.write
in interface VectorWriter
iterable
- The Iterable
to loop overmaxDocs
- the maximum number of docs to writeIOException
- if there was a problem writingpublic void write(Vector vector) throws IOException
VectorWriter
write
in interface VectorWriter
vector
- The Vector
to writeIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.