public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Writes a string encoded with {@link DataInput modified UTF-8} to this * file, starting at the current file pointer. * * @param str * the string to write in {@link DataInput modified UTF-8} * format. * @throws IOException * if an I/O error occurs while writing to this file. * @throws UTFDataFormatException * if the encoded string is longer than 65535 bytes. * @see #readUTF() */ public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
offset += SizeOf.LONG; ModifiedUtf8.encode(buffer, offset, object); output.write(buffer, 0, buffer.length);
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Writes a string encoded with {@link DataInput modified UTF-8} to this * file, starting at the current file pointer. * * @param str * the string to write in {@link DataInput modified UTF-8} * format. * @throws IOException * if an I/O error occurs while writing to this file. * @throws UTFDataFormatException * if the encoded string is longer than 65535 bytes. * @see #readUTF() */ public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Writes a string encoded with {@link DataInput modified UTF-8} to this * file, starting at the current file pointer. * * @param str * the string to write in {@link DataInput modified UTF-8} * format. * @throws IOException * if an I/O error occurs while writing to this file. * @throws UTFDataFormatException * if the encoded string is longer than 65535 bytes. * @see #readUTF() */ public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Writes a string encoded with {@link DataInput modified UTF-8} to this * file, starting at the current file pointer. * * @param str * the string to write in {@link DataInput modified UTF-8} * format. * @throws IOException * if an I/O error occurs while writing to this file. * @throws UTFDataFormatException * if the encoded string is longer than 65535 bytes. * @see #readUTF() */ public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Writes a string encoded with {@link DataInput modified UTF-8} to this * file, starting at the current file pointer. * * @param str * the string to write in {@link DataInput modified UTF-8} * format. * @throws IOException * if an I/O error occurs while writing to this file. * @throws UTFDataFormatException * if the encoded string is longer than 65535 bytes. * @see #readUTF() */ public final void writeUTF(String str) throws IOException { write(ModifiedUtf8.encode(str)); } }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }
/** * Returns an array containing the <i>modified UTF-8</i> form of {@code s}, using a * big-endian 16-bit length. Throws UTFDataFormatException if {@code s} is too long * for a two-byte length. */ public static byte[] encode(String s) throws UTFDataFormatException { int utfCount = (int) ModifiedUtf8.countBytes(s, true); byte[] result = new byte[SizeOf.SHORT + utfCount]; Memory.pokeShort(result, 0, (short) utfCount, ByteOrder.BIG_ENDIAN); ModifiedUtf8.encode(result, SizeOf.SHORT, s); return result; }