public class WarcWriterCompressed extends WarcWriter
| Modifier and Type | Field and Description |
|---|---|
protected GzipEntry |
entry
Current GZip entry.
|
protected GzipWriter |
writer
GZip Writer used.
|
bExceptionOnContentLengthMismatch, diagnostics, fieldParsers, header, headerContentLength, out, payloadWrittenTotal, S_HEADER_WRITTEN, S_INIT, S_PAYLOAD_WRITTEN, S_RECORD_CLOSED, state, stream_copy_buffer, uriProfile, warcDateFormat, warcTargetUriProfile| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close WARC writer and free its resources.
|
void |
closeRecord()
Close the WARC record in an implementation specific way.
|
boolean |
isCompressed()
Is this writer producing compressed output.
|
long |
streamPayload(InputStream in)
Stream the content of an input stream to the payload content.
|
byte[] |
writeHeader(WarcRecord record)
Write a WARC header to the WARC output stream.
|
long |
writePayload(byte[] b)
Append the content of a byte array to the payload content.
|
long |
writePayload(byte[] b,
int offset,
int len)
Append the partial content of a byte array to the payload content.
|
void |
writeRawHeader(byte[] header_bytes,
Long contentLength)
Write a raw WARC header to the WARC output stream.
|
closeRecord_impl, exceptionOnContentLengthMismatch, getUriProfile, getWarcTargetUriProfile, init, setExceptionOnContentLengthMismatch, setUriProfile, setWarcTargetUriProfile, writeHeader_implprotected GzipWriter writer
public boolean isCompressed()
WarcWriterisCompressed in class WarcWriterpublic void close() throws IOException
WarcWriterclose in interface Closeableclose in interface AutoCloseableclose in class WarcWriterIOException - if an i/o exception occurs while closing the writerpublic void closeRecord() throws IOException
WarcWritercloseRecord in class WarcWriterIOException - if an i/o exception occurs while closing the recordpublic void writeRawHeader(byte[] header_bytes, Long contentLength) throws IOException
WarcWriterwriteRawHeader in class WarcWriterheader_bytes - raw WARC header to outputcontentLength - the expected content-length to be written and validatedIOException - if an i/o exception occurs while writing header datapublic byte[] writeHeader(WarcRecord record) throws IOException
WarcWriterwriteHeader in class WarcWriterrecord - WARC record to outputIOException - if an i/o exception occurs while writing header datapublic long streamPayload(InputStream in) throws IOException
WarcWriterstreamPayload in class WarcWriterin - input stream containing payload dataIOException - if an i/o exception occurs while writing payload datapublic long writePayload(byte[] b) throws IOException
WarcWriterwritePayload in class WarcWriterb - byte array with data to be writtenIOException - if an i/o exception occurs while writing payload datapublic long writePayload(byte[] b, int offset, int len) throws IOException
WarcWriterwritePayload in class WarcWriterb - byte array with partial data to be writtenoffset - offset to data to be writtenlen - length of data to be writtenIOException - if an i/o exception occurs while writing payload dataCopyright © 2011–2015. All rights reserved.