Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.ssh2
Class SSH2DataBuffer

    java.lang.Object
      com.mindbright.ssh2.SSH2DataBuffer

Direct Known Subclasses:
  SSH2SFTP.SFTPPacket, SSH2TransportPDU

public class SSH2DataBuffer
extends java.lang.Object

This class implements a read/write buffer with all protocol specific formatting (as defined in the architecture spec.). It is mainly used in the form of a protocol data unit (derived class `SSH2TransportPDU`).

Field Summary
`static int` | `BOOLEAN_FALSE`
`static int` | `BOOLEAN_TRUE`
`protected byte[]` | `data`
`protected int` | `rPos`
`protected int` | `wPos`

Constructor Summary
`protected` | `SSH2DataBuffer()`
`` | `SSH2DataBuffer(int bufSize)`

Method Summary
`byte[]` | `getData()`
`int` | `getMaxReadSize()`
`int` | `getMaxSize()`
`int` | `getMaxWriteSize()`
`int` | `getRPos()`
`int` | `getWPos()`
`java.math.BigInteger` | `readBigInt()`
`java.math.BigInteger` | `readBigIntBits()`
`boolean` | `readBoolean()`
`int` | `readByte()`
`int` | `readInt()`
`java.lang.String` | `readJavaString()`
`long` | `readLong()`
`void` | `readRaw(byte[] raw, int off, int len)`
`byte[]` | `readRaw(int len)`
`byte[]` | `readRestRaw()`
`byte[]` | `readString()`
`int` | `readString(byte[] str, int off)`
`void` | `reset()`
`void` | `setData(byte[] data)`
`void` | `setRPos(int rPos)`
`void` | `setWPos(int wPos)`
`void` | `writeBigInt(java.math.BigInteger bi)`
`void` | `writeBigIntBits(java.math.BigInteger bi)`
`void` | `writeBoolean(boolean b)`
`void` | `writeByte(int b)`
`void` | `writeInt(int i)`
`void` | `writeLong(long l)`
`void` | `writeRaw(byte[] raw)`
`void` | `writeRaw(byte[] raw, int off, int len)`
`void` | `writeString(byte[] str)`
`void` | `writeString(byte[] str, int off, int len)`
`void` | `writeString(java.lang.String str)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BOOLEAN_TRUE

    public static final int BOOLEAN_TRUE

See Also:
  Constant Field Values

### BOOLEAN_FALSE

    public static final int BOOLEAN_FALSE

See Also:
  Constant Field Values

### data

    protected byte[] data

### rPos

    protected int rPos

### wPos

    protected int wPos

Constructor Detail

### SSH2DataBuffer

    protected SSH2DataBuffer()

### SSH2DataBuffer

    public SSH2DataBuffer(int bufSize)

Method Detail

### reset

    public final void reset()

### getMaxSize

    public final int getMaxSize()

### getData

    public final byte[] getData()

### setData

    public final void setData(byte[] data)

### setWPos

    public final void setWPos(int wPos)

### getWPos

    public final int getWPos()

### setRPos

    public final void setRPos(int rPos)

### getRPos

    public final int getRPos()

### getMaxReadSize

    public final int getMaxReadSize()

### getMaxWriteSize

    public final int getMaxWriteSize()

### readByte

    public final int readByte()

### writeByte

    public void writeByte(int b)

### readBoolean

    public final boolean readBoolean()

### writeBoolean

    public final void writeBoolean(boolean b)

### readInt

    public final int readInt()

### writeInt

    public final void writeInt(int i)

### readLong

    public final long readLong()

### writeLong

    public final void writeLong(long l)

### readBigInt

    public final java.math.BigInteger readBigInt()

### readBigIntBits

    public final java.math.BigInteger readBigIntBits()

### writeBigInt

    public final void writeBigInt(java.math.BigInteger bi)

### writeBigIntBits

    public final void writeBigIntBits(java.math.BigInteger bi)

### readJavaString

    public final java.lang.String readJavaString()

### readString

    public final byte[] readString()

### readString

    public final int readString(byte[] str,
                                int off)

### writeString

    public final void writeString(java.lang.String str)

### writeString

    public final void writeString(byte[] str)

### writeString

    public void writeString(byte[] str,
                            int off,
                            int len)

### readRestRaw

    public final byte[] readRestRaw()

### readRaw

    public final byte[] readRaw(int len)

### readRaw

    public final void readRaw(byte[] raw,
                              int off,
                              int len)

### writeRaw

    public final void writeRaw(byte[] raw)

### writeRaw

    public void writeRaw(byte[] raw,
                         int off,
                         int len)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD