public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
public ByteChunk( int initial ) { allocate( initial, -1 ); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Convert a message bytes chars to bytes */ public void convert(MessageBytes mb ) throws IOException { int type=mb.getType(); if( type==MessageBytes.T_BYTES ) return; ByteChunk orig=bb; setByteChunk( mb.getByteChunk()); bb.recycle(); bb.allocate( 32, -1 ); if( type==MessageBytes.T_STR ) { convert( mb.getString() ); // System.out.println("XXX Converting " + mb.getString() ); } else if( type==MessageBytes.T_CHARS ) { CharChunk charC=mb.getCharChunk(); convert( charC.getBuffer(), charC.getStart(), charC.getLength()); //System.out.println("XXX Converting " + mb.getCharChunk() ); } else { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "XXX unknowon type {0}", type); } } //System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); setByteChunk(orig); }
/** Copy the src into this MessageBytes, allocating more space if * needed */ public void duplicate( MessageBytes src ) throws IOException { // START CR 6309514 // Discard previous state before duplicating recycle(); // END CR 6309514 switch( src.getType() ) { case MessageBytes.T_BYTES: type=T_BYTES; ByteChunk bc=src.getByteChunk(); byteC.allocate( 2 * bc.getLength(), -1 ); byteC.append( bc ); break; case MessageBytes.T_CHARS: type=T_CHARS; CharChunk cc=src.getCharChunk(); charC.allocate( 2 * cc.getLength(), -1 ); charC.append( cc ); break; case MessageBytes.T_STR: type=T_STR; String sc=src.getString(); this.setString( sc ); break; } }
/** Copy the src into this MessageBytes, allocating more space if * needed */ public void duplicate( MessageBytes src ) throws IOException { // START CR 6309514 // Discard previous state before duplicating recycle(); // END CR 6309514 switch( src.getType() ) { case MessageBytes.T_BYTES: type=T_BYTES; ByteChunk bc=src.getByteChunk(); byteC.allocate( 2 * bc.getLength(), -1 ); byteC.append( bc ); break; case MessageBytes.T_CHARS: type=T_CHARS; CharChunk cc=src.getCharChunk(); charC.allocate( 2 * cc.getLength(), -1 ); charC.append( cc ); break; case MessageBytes.T_STR: type=T_STR; String sc=src.getString(); this.setString( sc ); break; } }