org.gnu.jcifs
Class MarshalBuffer

java.lang.Object
  |
  +--org.gnu.jcifs.MarshalBuffer
Direct Known Subclasses:
FileInfoBuffer, SMBMessage

class MarshalBuffer
extends java.lang.Object


Field Summary
protected  byte[] fBuffer
           
protected  int fSize
           
static java.lang.String ISO8859_1
           
 
Constructor Summary
(package private) MarshalBuffer(int capacity)
           
 
Method Summary
protected static int align(int p, int a)
          aligns p to a bytes
(package private)  void debug(java.lang.String title)
           
 java.lang.String getAsciiStringAt(int pos, int len)
           
 short getBigEndianShortAt(int pos)
           
 byte getByteAt(int off)
           
(package private)  byte[] getBytes()
           
(package private)  int getCapacity()
           
 int getIntAt(int pos)
           
 long getLongAt(int pos)
           
 int getShortAt(int pos)
           
 short getSignedShortAt(int pos)
           
(package private)  int getSize()
           
 java.lang.String getUnicodeStringAt(int pos, int bytes)
           
 java.lang.String getZTAsciiStringAt(int pos, int maximum)
          Read Zero Terminated Ascii String
 int setAsciiStringAt(int pos, java.lang.String s)
           
 int setByteAt(int off, byte val)
           
 int setBytesAt(int pos, byte[] bytes, int off, int len)
           
 int setBytesAt(int pos, char[] bytes, int off, int len)
           
 void setBytesAt(int pos, MarshalBuffer bytes, int from, int len)
           
(package private)  void setCapacity(int size)
           
static int setIntAt(int pos, byte[] buf, int val)
           
 int setIntAt(int pos, int val)
           
 int setShortAt(int pos, int val)
           
 int setShortAt(int pos, short val)
           
(package private)  void setSize(int size)
           
 int setZTAsciiStringAt(int pos, java.lang.String s)
           
(package private)  void zero(int len)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fBuffer

protected byte[] fBuffer

fSize

protected int fSize

ISO8859_1

public static final java.lang.String ISO8859_1
Constructor Detail

MarshalBuffer

MarshalBuffer(int capacity)
Method Detail

getCapacity

int getCapacity()

getSize

int getSize()

setSize

void setSize(int size)

getBytes

byte[] getBytes()

setCapacity

void setCapacity(int size)

zero

void zero(int len)

setIntAt

public int setIntAt(int pos,
                    int val)

setIntAt

public static int setIntAt(int pos,
                           byte[] buf,
                           int val)

getIntAt

public int getIntAt(int pos)

getLongAt

public long getLongAt(int pos)

setShortAt

public int setShortAt(int pos,
                      short val)

setShortAt

public int setShortAt(int pos,
                      int val)

getShortAt

public int getShortAt(int pos)

getSignedShortAt

public short getSignedShortAt(int pos)

getBigEndianShortAt

public short getBigEndianShortAt(int pos)

getZTAsciiStringAt

public java.lang.String getZTAsciiStringAt(int pos,
                                           int maximum)
Read Zero Terminated Ascii String

getUnicodeStringAt

public java.lang.String getUnicodeStringAt(int pos,
                                           int bytes)

getAsciiStringAt

public java.lang.String getAsciiStringAt(int pos,
                                         int len)

setZTAsciiStringAt

public int setZTAsciiStringAt(int pos,
                              java.lang.String s)

setAsciiStringAt

public int setAsciiStringAt(int pos,
                            java.lang.String s)

setByteAt

public int setByteAt(int off,
                     byte val)

getByteAt

public byte getByteAt(int off)

setBytesAt

public int setBytesAt(int pos,
                      byte[] bytes,
                      int off,
                      int len)

setBytesAt

public int setBytesAt(int pos,
                      char[] bytes,
                      int off,
                      int len)

setBytesAt

public void setBytesAt(int pos,
                       MarshalBuffer bytes,
                       int from,
                       int len)

debug

void debug(java.lang.String title)

align

protected static final int align(int p,
                                 int a)
aligns p to a bytes
Parameters:
p - current position
a - alignment (2,4,8)
Returns:
aligned p