@Override public void writeSmallString( String s ) { final byte[] bytes = Byt.bytes( s ); this.addUnsignedByte( ( short ) bytes.length ); this.add( bytes ); }
private final Object decodeNumber(boolean negative) { char[] chars = characterSource.readNumber (); Object value = null; if ( CharScanner.hasDecimalChar ( chars, negative ) ) { value = CharScanner.parseDouble( chars ); } else if (CharScanner.isInteger ( chars )) { value = CharScanner.parseInt ( chars ); } else if (CharScanner.isLong( chars )) { value = CharScanner.parseLong ( chars ); } return value; }
@Override public void writeMediumString( String s ) { final byte[] bytes = Byt.bytes( s ); this.addUnsignedShort( bytes.length ); this.add( bytes ); }
private final Object decodeNumber(boolean negative) { char[] chars = characterSource.readNumber (); Object value = null; if ( CharScanner.hasDecimalChar ( chars, negative ) ) { value = CharScanner.parseDouble( chars ); } else if (CharScanner.isInteger ( chars )) { value = CharScanner.parseInt ( chars ); } else if (CharScanner.isLong( chars )) { value = CharScanner.parseLong ( chars ); } return value; }
@Override public void writeSmallString( String s ) { final byte[] bytes = Byt.bytes( s ); this.addUnsignedByte( ( short ) bytes.length ); this.add( bytes ); }
@Override public void writeMediumString( String s ) { final byte[] bytes = Byt.bytes( s ); this.addUnsignedShort( bytes.length ); this.add( bytes ); }