Class Encoders
- java.lang.Object
-
- com.aayushatharva.brotli4j.encoder.Encoders
-
public final class Encoders extends java.lang.ObjectMultiple 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.ByteBufcompress(io.netty.buffer.ByteBuf src, boolean pooled)Encodes the givenByteBufstatic voidcompress(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst)Encodes the givenByteBufstatic voidcompress(io.netty.buffer.ByteBuf src, io.netty.buffer.ByteBuf dst, Encoder.Parameters params)Encodes the givenByteBufstatic voidcompress(java.nio.ByteBuffer src, java.nio.ByteBuffer dst)Encodes the givenByteBufferstatic voidcompress(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.IOExceptionEncodes the givenByteBuf- Parameters:
src-ByteBufsourcepooled- If set totruethen this method will returnPooledDirectByteBufelseUnpooledDirectByteBuf- Returns:
- If
pooledis set totruethen this method will returnPooledDirectByteBufelseUnpooledDirectByteBuf - 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.IOExceptionEncodes the givenByteBuf- Parameters:
src-ByteBufsourcedst-ByteBufdestination- 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.IOExceptionEncodes the givenByteBuffer- Parameters:
src-ByteBuffersourcedst-ByteBufferdestination- 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.IOExceptionEncodes the givenByteBuffer- Parameters:
src-ByteBuffersourcedst-ByteBufferdestinationparams-Encoder.Parametersinstance- 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.IOExceptionEncodes the givenByteBuf- Parameters:
src-ByteBuffersourcedst-ByteBufferdestinationparams-Encoder.Parametersinstance- Throws:
java.io.IOException- Thrown in case of error during encoding
-
-