public class ArcWriterCompressed extends ArcWriter
| 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| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close ARC writer and free its resources.
|
void |
closeRecord()
Close the ARC 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(ArcRecordBase record)
Write a ARC header to the ARC 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 ARC header to the ARC output stream.
|
closeRecord_impl, exceptionOnContentLengthMismatch, init, setExceptionOnContentLengthMismatch, writeHeader_implprotected GzipWriter writer
public boolean isCompressed()
ArcWriterisCompressed in class ArcWriterpublic void close() throws java.io.IOException
ArcWriterpublic void closeRecord() throws java.io.IOException
ArcWritercloseRecord in class ArcWriterjava.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
ArcWriterwriteRawHeader in class ArcWriterheader_bytes - raw ARC record to outputcontentLength - the expected content-length to be written and validated
The contentLength is synonymous to the Archive-Length.java.io.IOException - if an exception occurs while writing header datapublic byte[] writeHeader(ArcRecordBase record) throws java.io.IOException
ArcWriterwriteHeader in class ArcWriterrecord - ARC 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
ArcWriterstreamPayload in class ArcWriterin - 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
ArcWriterwritePayload in class ArcWriterb - 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
ArcWriterwritePayload in class ArcWriterb - 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–2022. All rights reserved.