List of utility methods to do DataOutputStream Write String
void | writeString(String stringToWrite, DataOutputStream data) Writes a String to the DataOutputStream if (stringToWrite.length() > 32767) { throw new IOException("String too big"); } else { data.writeShort(stringToWrite.length()); data.writeChars(stringToWrite); |
void | writeStringAsBytes(DataOutputStream out, byte[] byteArray) write String As Bytes out.writeInt(byteArray.length); out.write(byteArray); |
void | writeStringAsBytes(DataOutputStream out, byte[] byteArray) Writes string as bytes to data output stream. out.writeInt(byteArray.length); out.write(byteArray); |
void | writeStringList(List write String List if (list == null) { os.writeInt(-1); return; os.writeInt(list.size()); for (int k = 0; k < list.size(); k++) { writeString(list.get(k), os); |
void | writeStringOrNull(DataOutputStream out, String string) write String Or Null if (string == null) out.writeByte(NULL); else { out.writeByte(OBJECT); out.writeUTF(string); |