Top Description Inners Fields Constructors Methods
org.apache.avro.file

public Class BZip2Codec

extends Codec
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, java.nio.ByteBuffer, org.apache.avro.util.NonCopyingByteArrayOutputStream, org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream, .BZip2CompressorOutputStream

Implements bzip2 compression and decompression.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final byte[]
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
compress(ByteBuffer uncompressedData)

Implements abstract org.apache.avro.file.Codec.compress.

Compresses the input data
public ByteBuffer
decompress(ByteBuffer compressedData)

Implements abstract org.apache.avro.file.Codec.decompress.

Decompress the data
public boolean
equals(Object
the reference object with which to compare.
obj
)

Implements abstract org.apache.avro.file.Codec.equals.

Codecs must implement an equals() method.
public String
getName()

Implements abstract org.apache.avro.file.Codec.getName.

Name of the codec; written to the file's metadata.
public int
hashCode()

Implements abstract org.apache.avro.file.Codec.hashCode.

Codecs must implement a hashCode() method that is consistent with equals().
Inherited from org.apache.avro.file.Codec:
computeOffsettoString

Field Detail

bufferback to summary
private final byte[] buffer
DEFAULT_BUFFER_SIZEback to summary
public static final int DEFAULT_BUFFER_SIZE

Constructor Detail

BZip2Codecback to summary
public BZip2Codec()

Method Detail

compressback to summary
public ByteBuffer compress(ByteBuffer uncompressedData) throws IOException

Implements abstract org.apache.avro.file.Codec.compress.

Doc from org.apache.avro.file.Codec.compress.

Compresses the input data

Annotations
@Override
decompressback to summary
public ByteBuffer decompress(ByteBuffer compressedData) throws IOException

Implements abstract org.apache.avro.file.Codec.decompress.

Doc from org.apache.avro.file.Codec.decompress.

Decompress the data

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Implements abstract org.apache.avro.file.Codec.equals.

Doc from org.apache.avro.file.Codec.equals.

Codecs must implement an equals() method. Two codecs, A and B are equal if: the result of A and B decompressing content compressed by A is the same AND the result of A and B decompressing content compressed by B is the same

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.apache.avro.file.Codec.getName.

Doc from org.apache.avro.file.Codec.getName.

Name of the codec; written to the file's metadata.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Implements abstract org.apache.avro.file.Codec.hashCode.

Doc from org.apache.avro.file.Codec.hashCode.

Codecs must implement a hashCode() method that is consistent with equals().

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
org.apache.avro.file back to summary

pack-priv Class BZip2Codec.Option

extends CodecFactory
Class Inheritance

Field Summary

Inherited from org.apache.avro.file.CodecFactory:
DEFAULT_DEFLATE_LEVELDEFAULT_XZ_LEVELDEFAULT_ZSTANDARD_BUFFERPOOLDEFAULT_ZSTANDARD_LEVEL

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Codec
createInstance()

Implements abstract org.apache.avro.file.CodecFactory.createInstance.

Creates internal Codec.
Inherited from org.apache.avro.file.CodecFactory:
addCodecbzip2CodecdeflateCodecfromStringnullCodecsnappyCodectoStringxzCodeczstandardCodeczstandardCodeczstandardCodec

Constructor Detail

Optionback to summary
pack-priv Option()

Method Detail

createInstanceback to summary
protected Codec createInstance()

Implements abstract org.apache.avro.file.CodecFactory.createInstance.

Doc from org.apache.avro.file.CodecFactory.createInstance.

Creates internal Codec.

Annotations
@Override