## org.apache.mahout.utils.vectors.io
Interface VectorWriter

All Known Implementing Classes:
  JWriterVectorWriter, SequenceFileVectorWriter

    public interface 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.

Method Detail

### write

    long write(Iterable<Vector> iterable)
               throws IOException

  Write all values in the Iterable to the output

  Returns:
    the number of docs written
  Throws:
    `IOException` - if there was a problem writing

### write

    long write(Iterable<Vector> iterable,
               long maxDocs)
               throws IOException

  Write the first `maxDocs` to the output.

  Parameters:
    `maxDocs` - the maximum number of docs to write
  Returns:
    The number of docs written
  Throws:
    `IOException` - if there was a problem writing

### close

    void close()
               throws IOException

  Close any internally held resources. If external Writers are passed in, the implementation should indicate whether it also closes them

  Throws:
    `IOException` - if there was an issue closing the item

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.