com.sshtools.j2ssh.io
Class ByteArrayWriter

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by com.sshtools.j2ssh.io.ByteArrayWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ByteArrayWriter
extends java.io.ByteArrayOutputStream

Version:
$Revision: 1.18 $
Author:
$author$

Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
ByteArrayWriter()
          Creates a new ByteArrayWriter object.
 
Method Summary
static byte[] encodeInt(int i)
           
 void writeBigInteger(java.math.BigInteger bi)
           
 void writeBinaryString(byte[] data)
           
 void writeBoolean(boolean b)
           
 void writeInt(int i)
           
 void writeInt(long i)
           
static void writeIntToArray(byte[] array, int pos, int value)
           
 void writeString(java.lang.String str)
           
 void writeUINT32(UnsignedInteger32 value)
           
 void writeUINT64(UnsignedInteger64 value)
           
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteArrayWriter

public ByteArrayWriter()
Creates a new ByteArrayWriter object.

Method Detail

writeBigInteger

public void writeBigInteger(java.math.BigInteger bi)
                     throws java.io.IOException
Parameters:
bi -
Throws:
java.io.IOException

writeBoolean

public void writeBoolean(boolean b)
                  throws java.io.IOException
Parameters:
b -
Throws:
java.io.IOException

writeBinaryString

public void writeBinaryString(byte[] data)
                       throws java.io.IOException
Parameters:
data -
Throws:
java.io.IOException

writeInt

public void writeInt(long i)
              throws java.io.IOException
Parameters:
i -
Throws:
java.io.IOException

writeInt

public void writeInt(int i)
              throws java.io.IOException
Parameters:
i -
Throws:
java.io.IOException

encodeInt

public static byte[] encodeInt(int i)
Parameters:
i -
Returns:

writeUINT32

public void writeUINT32(UnsignedInteger32 value)
                 throws java.io.IOException
Parameters:
value -
Throws:
java.io.IOException

writeUINT64

public void writeUINT64(UnsignedInteger64 value)
                 throws java.io.IOException
Parameters:
value -
Throws:
java.io.IOException

writeIntToArray

public static void writeIntToArray(byte[] array,
                                   int pos,
                                   int value)
                            throws java.io.IOException
Parameters:
array -
pos -
value -
Throws:
java.io.IOException

writeString

public void writeString(java.lang.String str)
                 throws java.io.IOException
Parameters:
str -
Throws:
java.io.IOException


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.