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

public Class XZCodec

extends Codec
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .OutputStream, java.nio.ByteBuffer, org.apache.avro.util.NonCopyingByteArrayOutputStream, org.apache.commons.compress.compressors.xz.XZCompressorInputStream, .XZCompressorOutputStream, org.apache.commons.compress.utils.IOUtils

Implements xz 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 int
private static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
XZCodec(int compressionLevel)

Method Summary

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

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

Compresses the input data
public ByteBuffer
decompress(ByteBuffer data)

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().
public String
toString()

Overrides org.apache.avro.file.Codec.toString.

Returns a string representation of the object.
Inherited from org.apache.avro.file.Codec:
computeOffset

Field Detail

compressionLevelback to summary
private int compressionLevel
DEFAULT_BUFFER_SIZEback to summary
private static final int DEFAULT_BUFFER_SIZE
DEFAULT_COMPRESSIONback to summary
public static final int DEFAULT_COMPRESSION

Constructor Detail

XZCodecback to summary
public XZCodec(int compressionLevel)

Method Detail

compressback to summary
public ByteBuffer compress(ByteBuffer data) 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 data) 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
toStringback to summary
public String toString()

Overrides org.apache.avro.file.Codec.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

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

pack-priv Class XZCodec.Option

extends CodecFactory
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.apache.avro.file.CodecFactory:
DEFAULT_DEFLATE_LEVELDEFAULT_XZ_LEVELDEFAULT_ZSTANDARD_BUFFERPOOLDEFAULT_ZSTANDARD_LEVEL

Constructor Summary

AccessConstructor and Description
pack-priv
Option(int compressionLevel)

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

Field Detail

compressionLevelback to summary
private int compressionLevel

Constructor Detail

Optionback to summary
pack-priv Option(int compressionLevel)

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