public final class ByteUtil
extends java.lang.Object
Constructor and Description |
---|
ByteUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
writeInt(int i,
java.io.OutputStream os)
Write the bytes of the int i to the OutputStream in big endian order.
|
static void |
writeLong(long l,
java.io.OutputStream os)
Write the bytes of the long l to the OutputStream in big endian order.
|
static void |
writeString(java.lang.String s,
java.io.OutputStream os)
Write the bytes of the String s to the OutputStream.
|
public static final void writeInt(int i, java.io.OutputStream os) throws java.io.IOException
i
- an int valueos
- an OutputStreamjava.io.IOException
- on errorpublic static void writeLong(long l, java.io.OutputStream os) throws java.io.IOException
l
- a long valueos
- an OutputStreamjava.io.IOException
- on errorpublic static void writeString(java.lang.String s, java.io.OutputStream os) throws java.io.IOException
s
- a Stringos
- an OutputStreamjava.io.IOException
- on error