Package org.brotli.dec
Class Utils
- java.lang.Object
-
- org.brotli.dec.Utils
-
final class Utils extends java.lang.ObjectA set of utility methods.
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]BYTE_ZEROESprivate static int[]INT_ZEROES
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.nio.ByteBufferasReadOnlyBuffer(java.nio.ByteBuffer src)(package private) static voidcloseInput(java.io.InputStream src)(package private) static voidcopyBytes(byte[] dst, int target, byte[] src, int start, int end)(package private) static voidcopyBytesWithin(byte[] bytes, int target, int start, int end)(package private) static voidfillBytesWithZeroes(byte[] dest, int start, int end)Fills byte array with zeroes.(package private) static voidfillIntsWithZeroes(int[] dest, int start, int end)Fills int array with zeroes.(package private) static voidflipBuffer(java.nio.Buffer buffer)(package private) static intgetLogBintness()(package private) static intisDebugMode()(package private) static intisDirect(java.nio.ByteBuffer src)(package private) static intisReadOnly(java.nio.ByteBuffer src)(package private) static intreadInput(java.io.InputStream src, byte[] dst, int offset, int length)(package private) static byte[]toUsAsciiBytes(java.lang.String src)
-
-
-
Method Detail
-
fillBytesWithZeroes
static void fillBytesWithZeroes(byte[] dest, int start, int end)Fills byte array with zeroes.Current implementation uses
System.arraycopy(java.lang.Object, int, java.lang.Object, int, int), so it should be used for length not less than 16.- Parameters:
dest- array to fill with zeroesoffset- the first byte to filllength- number of bytes to change
-
fillIntsWithZeroes
static void fillIntsWithZeroes(int[] dest, int start, int end)Fills int array with zeroes.Current implementation uses
System.arraycopy(java.lang.Object, int, java.lang.Object, int, int), so it should be used for length not less than 16.- Parameters:
dest- array to fill with zeroesoffset- the first item to filllength- number of item to change
-
copyBytes
static void copyBytes(byte[] dst, int target, byte[] src, int start, int end)
-
copyBytesWithin
static void copyBytesWithin(byte[] bytes, int target, int start, int end)
-
readInput
static int readInput(java.io.InputStream src, byte[] dst, int offset, int length)
-
closeInput
static void closeInput(java.io.InputStream src) throws java.io.IOException- Throws:
java.io.IOException
-
toUsAsciiBytes
static byte[] toUsAsciiBytes(java.lang.String src)
-
asReadOnlyBuffer
static java.nio.ByteBuffer asReadOnlyBuffer(java.nio.ByteBuffer src)
-
isReadOnly
static int isReadOnly(java.nio.ByteBuffer src)
-
isDirect
static int isDirect(java.nio.ByteBuffer src)
-
flipBuffer
static void flipBuffer(java.nio.Buffer buffer)
-
isDebugMode
static int isDebugMode()
-
getLogBintness
static int getLogBintness()
-
-