Top Description Constructors Methods
com.aayushatharva.brotli4j.encoder

public final Class Encoders

extends Object
Class Inheritance
Annotations
@Local
Imports
com.aayushatharva.brotli4j.common.annotations.Local, io.netty.buffer.ByteBuf, .PooledByteBufAllocator, .Unpooled, .UnpooledDirectByteBuf, java.io.IOException, java.nio.ByteBuffer

Multiple encoding methods using Netty Buffer Make sure to add it as dependency before using this class
See Also
Netty Buffer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ByteBuf

Returns:

If pooled is set to true then this method will return PooledDirectByteBuf else UnpooledDirectByteBuf
compress
(ByteBuf
ByteBuf source
src
,
boolean
If set to true then this method will return PooledDirectByteBuf else UnpooledDirectByteBuf
pooled
)

Encodes the given ByteBuf

public static void
compress(ByteBuf
ByteBuf source
src
,
ByteBuf
ByteBuf destination
dst
)

Encodes the given ByteBuf

public static void
compress(ByteBuffer
ByteBuffer source
src
,
ByteBuffer
ByteBuffer destination
dst
)

Encodes the given ByteBuffer

public static void
compress(ByteBuffer
ByteBuffer source
src
,
ByteBuffer
ByteBuffer destination
dst
,
Encoder.Parameters params)

Encodes the given ByteBuffer

public static void
compress(ByteBuf
ByteBuffer source
src
,
ByteBuf
ByteBuffer destination
dst
,
Encoder.Parameters params)

Encodes the given ByteBuf

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Encodersback to summary
public Encoders()

Method Detail

compressback to summary
public static ByteBuf compress(ByteBuf src, boolean pooled) throws IOException

Encodes the given ByteBuf

Parameters
src:ByteBuf

ByteBuf source

pooled:boolean

If set to true then this method will return PooledDirectByteBuf else UnpooledDirectByteBuf

Returns:ByteBuf

If pooled is set to true then this method will return PooledDirectByteBuf else UnpooledDirectByteBuf

Exceptions
IOException:
Thrown in case of error during encoding
compressback to summary
public static void compress(ByteBuf src, ByteBuf dst) throws IOException

Encodes the given ByteBuf

Parameters
src:ByteBuf

ByteBuf source

dst:ByteBuf

ByteBuf destination

Exceptions
IOException:
Thrown in case of error during encoding
compressback to summary
public static void compress(ByteBuffer src, ByteBuffer dst) throws IOException

Encodes the given ByteBuffer

Parameters
src:ByteBuffer

ByteBuffer source

dst:ByteBuffer

ByteBuffer destination

Exceptions
IOException:
Thrown in case of error during encoding
compressback to summary
public static void compress(ByteBuffer src, ByteBuffer dst, Encoder.Parameters params) throws IOException

Encodes the given ByteBuffer

Parameters
src:ByteBuffer

ByteBuffer source

dst:ByteBuffer

ByteBuffer destination

params:Encoder.Parameters

Encoder.Parameters instance

Exceptions
IOException:
Thrown in case of error during encoding
compressback to summary
public static void compress(ByteBuf src, ByteBuf dst, Encoder.Parameters params) throws IOException

Encodes the given ByteBuf

Parameters
src:ByteBuf

ByteBuffer source

dst:ByteBuf

ByteBuffer destination

params:Encoder.Parameters

Encoder.Parameters instance

Exceptions
IOException:
Thrown in case of error during encoding