@Override public void writeBoolean(boolean v) throws IOException { write(v ? 1:0); }
@Override public void writeByte(int v) throws IOException { write((byte)v); }
@Override public void write(byte b[]) throws IOException { write(b,0,b.length); }
@Override public void writeByte(int v) throws IOException { write((byte)v); }
@Override public void write(int b) throws IOException { write((byte)b); }
@Override public void write(int b) throws IOException { write((byte)b); }
@Override public void writeBoolean(boolean v) throws IOException { write(v ? 1:0); }
@Override public void write(int b) throws IOException { write((byte)b); }
@Override public void write(byte b[]) throws IOException { write(b,0,b.length); }
public void writeByte(int v) throws IOException { write((byte)v); }
@Override public void writeBytes(String s) throws IOException { // non-optimized version, but this shouldn't be used anyway for (int i=0; i<s.length(); i++) write((byte)s.charAt(i)); }
public void writeBytes(String s) throws IOException { // non-optimized version, but this shouldn't be used anyway for (int i=0; i<s.length(); i++) write((byte)s.charAt(i)); }
@Override public void writeBytes(String s) throws IOException { // non-optimized version, but this shouldn't be used anyway for (int i=0; i<s.length(); i++) write((byte)s.charAt(i)); }
public void writeByteArray(byte[] arr, int offset, int len) throws IOException { writeTag(BYTEARR, len); daos.write(arr, offset, len); }
public void writeByteArray(byte[] arr, int offset, int len) throws IOException { writeTag(BYTEARR, len); daos.write(arr, offset, len); }
public void writeByteArray(byte[] arr, int offset, int len) throws IOException { writeTag(BYTEARR, len); daos.write(arr, offset, len); }
/** * write the string as tag+length, with length being the number of UTF-8 bytes */ public void writeStr(String s) throws IOException { if (s == null) { writeTag(NULL); return; } int end = s.length(); int maxSize = end * 4; if (bytes == null || bytes.length < maxSize) bytes = new byte[maxSize]; int sz = ByteUtils.UTF16toUTF8(s, 0, end, bytes, 0); writeTag(STR, sz); daos.write(bytes, 0, sz); }