- java.lang.Object
-
- de.haumacher.msgbuf.coder.Coder
-
public class Coder extends Object
Run-length encoding and decoding of Java primitive types into a stream of characters.
-
-
Constructor Summary
Constructors Constructor Description Coder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendDouble(Appendable out, double num)static voidappendFloat(Appendable out, float num)static voidappendInt(Appendable out, int num)static voidappendLong(Appendable out, long num)static voidappendString(Appendable out, String s)static voidappendUInt(Appendable out, int num)static doublereadDouble(Reader in)static floatreadFloat(Reader in)static intreadInt(Reader in)static longreadLong(Reader in)static StringreadString(Reader in)static intreadUInt(Reader in)
-
-
-
Method Detail
-
appendInt
public static void appendInt(Appendable out, int num) throws IOException
- Throws:
IOException
-
appendUInt
public static void appendUInt(Appendable out, int num) throws IOException
- Throws:
IOException
-
readInt
public static int readInt(Reader in) throws IOException
- Throws:
IOException
-
readUInt
public static int readUInt(Reader in) throws IOException
- Throws:
IOException
-
appendLong
public static void appendLong(Appendable out, long num) throws IOException
- Throws:
IOException
-
readLong
public static long readLong(Reader in) throws IOException
- Throws:
IOException
-
appendString
public static void appendString(Appendable out, String s) throws IOException
- Throws:
IOException
-
readString
public static String readString(Reader in) throws IOException
- Throws:
IOException
-
appendFloat
public static void appendFloat(Appendable out, float num) throws IOException
- Throws:
IOException
-
readFloat
public static float readFloat(Reader in) throws IOException
- Throws:
IOException
-
appendDouble
public static void appendDouble(Appendable out, double num) throws IOException
- Throws:
IOException
-
readDouble
public static double readDouble(Reader in) throws IOException
- Throws:
IOException
-
-