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, 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(java.io.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,
java.lang.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 java.io.IOException
WarcWriterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class WarcWriterjava.io.IOException - if an I/O exception occurs while closing the writerpublic void closeRecord() throws java.io.IOException
WarcWritercloseRecord in class WarcWriterjava.io.IOException - if an I/O exception occurs while closing the recordpublic void writeRawHeader(byte[] header_bytes, java.lang.Long contentLength) throws java.io.IOException
WarcWriterwriteRawHeader in class WarcWriterheader_bytes - raw WARC header to outputcontentLength - the expected content-length to be written and validatedjava.io.IOException - if an I/O exception occurs while writing header datapublic byte[] writeHeader(WarcRecord record) throws java.io.IOException
WarcWriterwriteHeader in class WarcWriterrecord - WARC record to outputjava.io.IOException - if an I/O exception occurs while writing header datapublic long streamPayload(java.io.InputStream in) throws java.io.IOException
WarcWriterstreamPayload in class WarcWriterin - input stream containing payload datajava.io.IOException - if an I/O exception occurs while writing payload datapublic long writePayload(byte[] b) throws java.io.IOException
WarcWriterwritePayload in class WarcWriterb - byte array with data to be writtenjava.io.IOException - if an I/O exception occurs while writing payload datapublic long writePayload(byte[] b, int offset, int len) throws java.io.IOException
WarcWriterwritePayload in class WarcWriterb - byte array with partial data to be writtenoffset - offset to data to be writtenlen - length of data to be writtenjava.io.IOException - if an I/O exception occurs while writing payload dataCopyright © 2011–2023. All rights reserved.