Class Encoders
- java.lang.Object
-
- com.aayushatharva.brotli4j.encoder.Encoders
-
public final class Encoders extends java.lang.Object
Multiple encoding methods using Netty Buffer Make sure to add it as dependency before using this class- See Also:
- Netty Buffer
-
-
Constructor Summary
Constructors Constructor Description Encoders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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(java.nio.ByteBuffer src, java.nio.ByteBuffer dst)
Encodes the givenByteBuffer
static void
compress(java.nio.ByteBuffer src, java.nio.ByteBuffer dst, Encoder.Parameters params)
Encodes the givenByteBuffer
-
-
-
Method Detail
-
compress
public static io.netty.buffer.ByteBuf compress(io.netty.buffer.ByteBuf src, boolean pooled) throws java.io.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:
java.io.IOException
- Thrown in case of error during encoding
-
compress
public static void compress(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst) throws java.io.IOException
Encodes the givenByteBuf
- Parameters:
src
-ByteBuf
sourcedst
-ByteBuf
destination- Throws:
java.io.IOException
- Thrown in case of error during encoding
-
compress
public static void compress(java.nio.ByteBuffer src, java.nio.ByteBuffer dst) throws java.io.IOException
Encodes the givenByteBuffer
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destination- Throws:
java.io.IOException
- Thrown in case of error during encoding
-
compress
public static void compress(java.nio.ByteBuffer src, java.nio.ByteBuffer dst, Encoder.Parameters params) throws java.io.IOException
Encodes the givenByteBuffer
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destinationparams
-Encoder.Parameters
instance- Throws:
java.io.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 java.io.IOException
Encodes the givenByteBuf
- Parameters:
src
-ByteBuffer
sourcedst
-ByteBuffer
destinationparams
-Encoder.Parameters
instance- Throws:
java.io.IOException
- Thrown in case of error during encoding
-
-