net.yura.mobile.io
Class BinUtil
java.lang.Object
net.yura.mobile.io.BinUtil
- Direct Known Subclasses:
- ServiceLink.ServiceAccess
public class BinUtil
- extends Object
- Author:
- Lenin
Method Summary |
protected static void |
checkType(int got,
int want)
|
Object |
load(InputStream in)
|
protected Object[] |
readArray(DataInputStream in2)
|
protected byte[] |
readBytes(DataInputStream in2)
|
protected Hashtable |
readHashtable(DataInputStream in2)
|
protected Object |
readObject(DataInputStream in2)
|
protected Object |
readObject(DataInputStream in2,
int type,
int size)
|
protected Vector |
readVector(DataInputStream in2)
|
void |
save(OutputStream out,
Object obj)
|
protected void |
skipUnknownObjects(DataInputStream in,
int num)
|
protected void |
writeArray(DataOutputStream out,
Object[] object)
|
protected void |
writeBytes(DataOutputStream out,
byte[] bytes)
|
protected void |
writeHashtable(DataOutputStream out,
Hashtable hashtable)
|
protected void |
writeObject(DataOutputStream out,
Object obj)
|
protected void |
writeVector(DataOutputStream out,
Vector vector)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_ARRAY
public static final int TYPE_ARRAY
- See Also:
- Constant Field Values
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN
- See Also:
- Constant Field Values
TYPE_BYTE
public static final int TYPE_BYTE
- See Also:
- Constant Field Values
TYPE_BYTE_ARRAY
public static final int TYPE_BYTE_ARRAY
- See Also:
- Constant Field Values
TYPE_CHARACTER
public static final int TYPE_CHARACTER
- See Also:
- Constant Field Values
TYPE_DOUBLE
public static final int TYPE_DOUBLE
- See Also:
- Constant Field Values
TYPE_FLOAT
public static final int TYPE_FLOAT
- See Also:
- Constant Field Values
TYPE_HASHTABLE
public static final int TYPE_HASHTABLE
- See Also:
- Constant Field Values
TYPE_INTEGER
public static final int TYPE_INTEGER
- See Also:
- Constant Field Values
TYPE_LONG
public static final int TYPE_LONG
- See Also:
- Constant Field Values
TYPE_NULL
public static final int TYPE_NULL
- See Also:
- Constant Field Values
TYPE_SHORT
public static final int TYPE_SHORT
- See Also:
- Constant Field Values
TYPE_STRING
public static final int TYPE_STRING
- See Also:
- Constant Field Values
TYPE_VECTOR
public static final int TYPE_VECTOR
- See Also:
- Constant Field Values
BinUtil
public BinUtil()
checkType
protected static void checkType(int got,
int want)
throws IOException
- Throws:
IOException
load
public Object load(InputStream in)
throws IOException
- Throws:
IOException
readArray
protected Object[] readArray(DataInputStream in2)
throws IOException
- Throws:
IOException
readBytes
protected byte[] readBytes(DataInputStream in2)
throws IOException
- Throws:
IOException
readHashtable
protected Hashtable readHashtable(DataInputStream in2)
throws IOException
- Throws:
IOException
readObject
protected Object readObject(DataInputStream in2)
throws IOException
- Throws:
IOException
readObject
protected Object readObject(DataInputStream in2,
int type,
int size)
throws IOException
- Throws:
IOException
readVector
protected Vector readVector(DataInputStream in2)
throws IOException
- Throws:
IOException
save
public void save(OutputStream out,
Object obj)
throws IOException
- Throws:
IOException
skipUnknownObjects
protected void skipUnknownObjects(DataInputStream in,
int num)
throws IOException
- Throws:
IOException
writeArray
protected void writeArray(DataOutputStream out,
Object[] object)
throws IOException
- Throws:
IOException
writeBytes
protected void writeBytes(DataOutputStream out,
byte[] bytes)
throws IOException
- Throws:
IOException
writeHashtable
protected void writeHashtable(DataOutputStream out,
Hashtable hashtable)
throws IOException
- Throws:
IOException
writeObject
protected void writeObject(DataOutputStream out,
Object obj)
throws IOException
- Throws:
IOException
writeVector
protected void writeVector(DataOutputStream out,
Vector vector)
throws IOException
- Throws:
IOException