@Override public void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); }
@Override public void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); }
@Override public void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); }
protected byte[] readAMF3ByteArray() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object. return (byte[])storedObjects.get(lengthOrIndex); byte[] result = new byte[lengthOrIndex]; readFully(result, 0, lengthOrIndex); storedObjects.add(result); return result; }
protected String readAMF3XmlString() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object return (String)storedObjects.get(lengthOrIndex); byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); String result = new String(bytes, UTF8); storedObjects.add(result); return result; }
protected byte[] readAMF3ByteArray() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object. return (byte[])storedObjects.get(lengthOrIndex); byte[] result = new byte[lengthOrIndex]; readFully(result, 0, lengthOrIndex); storedObjects.add(result); return result; }
protected byte[] readAMF3ByteArray() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object. return (byte[])storedObjects.get(lengthOrIndex); byte[] result = new byte[lengthOrIndex]; readFully(result, 0, lengthOrIndex); storedObjects.add(result); return result; }
protected String readAMF3XmlString() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object return (String)storedObjects.get(lengthOrIndex); byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); String result = new String(bytes, UTF8); storedObjects.add(result); return result; }
protected String readAMF3XmlString() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored object return (String)storedObjects.get(lengthOrIndex); byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); String result = new String(bytes, UTF8); storedObjects.add(result); return result; }
protected String readAMF3String() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored string return storedStrings.get(lengthOrIndex); if (lengthOrIndex == 0) return ""; String result; if (lengthOrIndex <= buffer.length) { ensureAvailable(lengthOrIndex); result = new String(buffer, position, lengthOrIndex, UTF8); position += lengthOrIndex; } else { byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); result = new String(bytes, UTF8); } storedStrings.add(result); return result; }
protected String readAMF3String() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored string return storedStrings.get(lengthOrIndex); if (lengthOrIndex == 0) return ""; String result; if (lengthOrIndex <= buffer.length) { ensureAvailable(lengthOrIndex); result = new String(buffer, position, lengthOrIndex, UTF8); position += lengthOrIndex; } else { byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); result = new String(bytes, UTF8); } storedStrings.add(result); return result; }
protected String readAMF3String() throws IOException { final int type = readAMF3UnsignedInteger(); final int lengthOrIndex = type >>> 1; if ((type & 0x01) == 0) // stored string return storedStrings.get(lengthOrIndex); if (lengthOrIndex == 0) return ""; String result; if (lengthOrIndex <= buffer.length) { ensureAvailable(lengthOrIndex); result = new String(buffer, position, lengthOrIndex, UTF8); position += lengthOrIndex; } else { byte[] bytes = new byte[lengthOrIndex]; readFully(bytes, 0, lengthOrIndex); result = new String(bytes, UTF8); } storedStrings.add(result); return result; }
char[] utfChars = new char[length]; readFully(utfBytes);