public void putString(String s){
  ensureCapacity((s.length() * 2) + 1);
  System.arraycopy(s.getBytes(),0,this.byteBuffer,this.position,s.length());
  this.position+=s.length();
  this.byteBuffer[this.position++]=0;
}

public void putString ( String s ) { ensureCapacity ( ( s . length ( ) * 2 ) + 1 ) ; System . arraycopy ( s . getBytes ( ) , 0 , this . byteBuffer , this . position , s . length ( ) ) ; this . position += s . length ( ) ; this . byteBuffer [ this . position ++ ] = 0 ; }
put a string in the buffer .
