org.jwat.warc
Class WarcWriterFactory

java.lang.Object
  extended by org.jwat.warc.WarcWriterFactory

public class WarcWriterFactory
extends Object

Factory used for creating WarcWriter instances. Factory methods are available for creating WarcWriter instances for writing either compressed or uncompressed records. Use of buffered methods and/or buffering speeds up the writer considerably.

Author:
nicl

Constructor Summary
protected WarcWriterFactory()
          Private constructor to enforce factory method.
 
Method Summary
static WarcWriter getWriter(OutputStream out, boolean compressed)
          Creates a new unbuffered WarcWriter from an OutputStream.
static WarcWriter getWriter(OutputStream out, int buffer_size, boolean compressed)
          Creates a new buffered WarcWriter from an OutputStream.
static WarcWriter getWriterCompressed(OutputStream out)
          Creates a new unbuffered compressing WarcWriter from an OutputStream.
static WarcWriter getWriterCompressed(OutputStream out, int buffer_size)
          Creates a new buffered compressing WarcWriter from an OutputStream.
static WarcWriter getWriterUncompressed(OutputStream out)
          Creates a new unbuffered normal WarcWriter from an OutputStream.
static WarcWriter getWriterUncompressed(OutputStream out, int buffer_size)
          Creates a new buffered normal WarcWriter from an OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarcWriterFactory

protected WarcWriterFactory()
Private constructor to enforce factory method.

Method Detail

getWriter

public static WarcWriter getWriter(OutputStream out,
                                   boolean compressed)
Creates a new unbuffered WarcWriter from an OutputStream. Returns a normal or compressing writer according to the arguments.

Parameters:
out - output stream to write to
compressed - compression switch
Returns:
unbuffered WarcWriter

getWriter

public static WarcWriter getWriter(OutputStream out,
                                   int buffer_size,
                                   boolean compressed)
Creates a new buffered WarcWriter from an OutputStream. Returns a normal or compressing writer according to the arguments.

Parameters:
out - output stream to write to
buffer_size - buffer size to use
compressed - compression switch
Returns:
buffered WarcWriter

getWriterUncompressed

public static WarcWriter getWriterUncompressed(OutputStream out)
Creates a new unbuffered normal WarcWriter from an OutputStream.

Parameters:
out - output stream to write to
Returns:
unbuffered normal WarcWriter

getWriterUncompressed

public static WarcWriter getWriterUncompressed(OutputStream out,
                                               int buffer_size)
Creates a new buffered normal WarcWriter from an OutputStream.

Parameters:
out - output stream to write to
buffer_size - buffer size to use
Returns:
buffered normal WarcWriter

getWriterCompressed

public static WarcWriter getWriterCompressed(OutputStream out)
Creates a new unbuffered compressing WarcWriter from an OutputStream.

Parameters:
out - output stream to write to
Returns:
unbuffered compressing WarcWriter

getWriterCompressed

public static WarcWriter getWriterCompressed(OutputStream out,
                                             int buffer_size)
Creates a new buffered compressing WarcWriter from an OutputStream.

Parameters:
out - output stream to write to
buffer_size - buffer size to use
Returns:
buffered compressing WarcWriter


Copyright © 2011-2012. All Rights Reserved.