public class WarcWriterFactory extends Object
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.| Modifier | Constructor and Description |
|---|---|
protected |
WarcWriterFactory()
Private constructor to enforce factory methods.
|
| Modifier and Type | Method and Description |
|---|---|
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 non compressing
WarcWriter from an
OutputStream. |
static WarcWriter |
getWriterUncompressed(OutputStream out,
int buffer_size)
Creates a new buffered non compressing
WarcWriter from an
OutputStream. |
protected WarcWriterFactory()
public static WarcWriter getWriter(OutputStream out, boolean compressed)
WarcWriter from an
OutputStream.
Returns a compressing or non compressing writer according to the arguments.out - output stream to write tocompressed - compression switchWarcWriterpublic static WarcWriter getWriter(OutputStream out, int buffer_size, boolean compressed)
WarcWriter from an
OutputStream.
Returns a compressing or non compressing writer according to the arguments.out - output stream to write tobuffer_size - buffer size to usecompressed - compression switchWarcWriterpublic static WarcWriter getWriterUncompressed(OutputStream out)
WarcWriter from an
OutputStream.out - output stream to write toWarcWriterpublic static WarcWriter getWriterUncompressed(OutputStream out, int buffer_size)
WarcWriter from an
OutputStream.out - output stream to write tobuffer_size - buffer size to useWarcWriterpublic static WarcWriter getWriterCompressed(OutputStream out)
WarcWriter from an
OutputStream.out - output stream to write toWarcWriterpublic static WarcWriter getWriterCompressed(OutputStream out, int buffer_size)
WarcWriter from an
OutputStream.out - output stream to write tobuffer_size - buffer size to useWarcWriterCopyright © 2011–2015. All rights reserved.