public final class PngHelperInternal extends Object
Client code should not normally use this class
Modifier and Type | Field and Description |
---|---|
static Charset |
charsetLatin1 |
static String |
charsetLatin1name
Default charset, used internally by PNG for several things
|
static Charset |
charsetUTF8 |
static String |
charsetUTF8name
UTF-8 is only used for some chunks
|
static String |
KEY_LOGGER |
static Logger |
LOGGER |
Constructor and Description |
---|
PngHelperInternal() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(Object obj)
Prits a debug message (prints class name, method and line number)
|
static int |
doubleToInt100000(double d) |
static int |
filterRowAverage(int r,
int left,
int up) |
static int |
filterRowNone(int r) |
static int |
filterRowPaeth(int r,
int left,
int up,
int upleft) |
static int |
filterRowSub(int r,
int left) |
static int |
filterRowUp(int r,
int up) |
static long |
getDigest(PngReader pngr) |
static byte[] |
getPngIdSignature()
PNG magic bytes
|
static long |
getRawIdatBytes(PngReader r) |
static void |
initCrcForTests(PngReader pngr) |
static double |
intToDouble100000(int i) |
static boolean |
isDebug() |
static InputStream |
istreamFromFile(File f) |
static void |
logdebug(String msg) |
static int |
readByte(InputStream is) |
static void |
readBytes(InputStream is,
byte[] b,
int offset,
int len)
guaranteed to read exactly len bytes.
|
static int |
readInt1fromByte(byte[] b,
int offset) |
static int |
readInt2(InputStream is)
-1 if eof
PNG uses "network byte order"
|
static int |
readInt2fromBytes(byte[] b,
int offset) |
static int |
readInt4(InputStream is)
-1 if eof
|
static int |
readInt4fromBytes(byte[] b,
int offset) |
static void |
setDebug(boolean b)
Sets a global debug flag.
|
static void |
skipBytes(InputStream is,
long len) |
static void |
writeByte(OutputStream os,
byte b) |
static void |
writeByte(OutputStream os,
byte[] bs) |
static void |
writeBytes(OutputStream os,
byte[] b) |
static void |
writeBytes(OutputStream os,
byte[] b,
int offset,
int n) |
static void |
writeInt2(OutputStream os,
int n) |
static void |
writeInt2tobytes(int n,
byte[] b,
int offset) |
static void |
writeInt4(OutputStream os,
int n) |
static void |
writeInt4tobytes(int n,
byte[] b,
int offset) |
public static final String KEY_LOGGER
public static final Logger LOGGER
public static String charsetLatin1name
public static Charset charsetLatin1
public static String charsetUTF8name
public static Charset charsetUTF8
public static byte[] getPngIdSignature()
public static int doubleToInt100000(double d)
public static double intToDouble100000(int i)
public static int readByte(InputStream is)
public static int readInt2(InputStream is)
public static int readInt4(InputStream is)
public static int readInt1fromByte(byte[] b, int offset)
public static int readInt2fromBytes(byte[] b, int offset)
public static final int readInt4fromBytes(byte[] b, int offset)
public static void writeByte(OutputStream os, byte b)
public static void writeByte(OutputStream os, byte[] bs)
public static void writeInt2(OutputStream os, int n)
public static void writeInt4(OutputStream os, int n)
public static void writeInt2tobytes(int n, byte[] b, int offset)
public static void writeInt4tobytes(int n, byte[] b, int offset)
public static void readBytes(InputStream is, byte[] b, int offset, int len)
public static void skipBytes(InputStream is, long len)
public static void writeBytes(OutputStream os, byte[] b)
public static void writeBytes(OutputStream os, byte[] b, int offset, int n)
public static void logdebug(String msg)
public static int filterRowNone(int r)
public static int filterRowSub(int r, int left)
public static int filterRowUp(int r, int up)
public static int filterRowAverage(int r, int left, int up)
public static int filterRowPaeth(int r, int left, int up, int upleft)
public static void debug(Object obj)
obj
- : Object to printpublic static InputStream istreamFromFile(File f)
public static void setDebug(boolean b)
public static boolean isDebug()
public static long getDigest(PngReader pngr)
public static void initCrcForTests(PngReader pngr)
public static long getRawIdatBytes(PngReader r)
Copyright © 2014. All rights reserved.