Package com.sshtools.j2ssh.io
Class ByteArrayWriter
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
com.sshtools.j2ssh.io.ByteArrayWriter
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Version:
- $Revision: 1.18 $
- Author:
- $author$
-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]encodeInt(int i) voidvoidwriteBinaryString(byte[] data) voidwriteBoolean(boolean b) voidwriteInt(int i) voidwriteInt(long i) static voidwriteIntToArray(byte[] array, int pos, int value) voidwriteString(String str) voidwriteUINT32(UnsignedInteger32 value) voidwriteUINT64(UnsignedInteger64 value) Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeToMethods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
ByteArrayWriter
public ByteArrayWriter()Creates a new ByteArrayWriter object.
-
-
Method Details
-
writeBigInteger
- Parameters:
bi-- Throws:
IOException
-
writeBoolean
- Parameters:
b-- Throws:
IOException
-
writeBinaryString
- Parameters:
data-- Throws:
IOException
-
writeInt
- Parameters:
i-- Throws:
IOException
-
writeInt
- Parameters:
i-- Throws:
IOException
-
encodeInt
public static byte[] encodeInt(int i) - Parameters:
i-- Returns:
-
writeUINT32
- Parameters:
value-- Throws:
IOException
-
writeUINT64
- Parameters:
value-- Throws:
IOException
-
writeIntToArray
- Parameters:
array-pos-value-- Throws:
IOException
-
writeString
- Parameters:
str-- Throws:
IOException
-