Class Encoders
java.lang.Object
com.aayushatharva.brotli4j.encoder.Encoders
Multiple encoding methods using Netty Buffer
Make sure to add it as dependency before using this class
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.buffer.ByteBuf
compress
(io.netty.buffer.ByteBuf src, boolean pooled) Encodes the givenByteBuf
static void
compress
(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst) Encodes the givenByteBuf
static void
compress
(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst, Encoder.Parameters params) Encodes the givenByteBuf
static void
compress
(ByteBuffer src, ByteBuffer dst) Encodes the givenByteBuffer
static void
compress
(ByteBuffer src, ByteBuffer dst, Encoder.Parameters params) Encodes the givenByteBuffer
-
Constructor Details
-
Encoders
public Encoders()
-
-
Method Details
-
compress
public static io.netty.buffer.ByteBuf compress(io.netty.buffer.ByteBuf src, boolean pooled) throws IOException Encodes the givenByteBuf
- Parameters:
src
-ByteBuf
sourcepooled
- If set totrue
then this method will returnPooledDirectByteBuf
elseUnpooledDirectByteBuf
- Returns:
- If
pooled
is set totrue
then this method will returnPooledDirectByteBuf
elseUnpooledDirectByteBuf
- Throws:
IOException
- Thrown in case of error during encoding
-
compress
public static void compress(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst) throws IOException Encodes the givenByteBuf
- Parameters:
src
-ByteBuf
sourcedst
-ByteBuf
destination- Throws:
IOException
- Thrown in case of error during encoding
-
compress
Encodes the givenByteBuffer
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destination- Throws:
IOException
- Thrown in case of error during encoding
-
compress
public static void compress(ByteBuffer src, ByteBuffer dst, Encoder.Parameters params) throws IOException Encodes the givenByteBuffer
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destinationparams
-Encoder.Parameters
instance- Throws:
IOException
- Thrown in case of error during encoding
-
compress
public static void compress(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst, Encoder.Parameters params) throws IOException Encodes the givenByteBuf
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destinationparams
-Encoder.Parameters
instance- Throws:
IOException
- Thrown in case of error during encoding
-