protected Sha256Hash readHash() throws ProtocolException { // We have to flip it around, as it's been read off the wire in little endian. // Not the most efficient way to do this but the clearest. return Sha256Hash.wrapReversed(readBytes(32)); }
protected Sha256Hash readHash() throws ProtocolException { // We have to flip it around, as it's been read off the wire in little endian. // Not the most efficient way to do this but the clearest. return Sha256Hash.wrapReversed(readBytes(32)); }
protected Sha256Hash readHash() throws ProtocolException { // We have to flip it around, as it's been read off the wire in little endian. // Not the most efficient way to do this but the clearest. return Sha256Hash.wrapReversed(readBytes(32)); }
protected Sha256Hash readHash() throws ProtocolException { // We have to flip it around, as it's been read off the wire in little endian. // Not the most efficient way to do this but the clearest. return Sha256Hash.wrapReversed(readBytes(32)); }
protected byte[] readByteArray() throws ProtocolException { long len = readVarInt(); return readBytes((int)len); }
protected byte[] readByteArray() throws ProtocolException { long len = readVarInt(); return readBytes((int)len); }
protected BigInteger readUint64() throws ProtocolException { // Java does not have an unsigned 64 bit type. So scrape it off the wire then flip. return new BigInteger(Utils.reverseBytes(readBytes(8))); }
protected byte[] readByteArray() throws ProtocolException { long len = readVarInt(); return readBytes((int)len); }
protected BigInteger readUint64() throws ProtocolException { // Java does not have an unsigned 64 bit type. So scrape it off the wire then flip. return new BigInteger(Utils.reverseBytes(readBytes(8))); }
protected BigInteger readUint64() throws ProtocolException { // Java does not have an unsigned 64 bit type. So scrape it off the wire then flip. return new BigInteger(Utils.reverseBytes(readBytes(8))); }
protected byte[] readByteArray() throws ProtocolException { long len = readVarInt(); return readBytes((int)len); }
protected BigInteger readUint64() throws ProtocolException { // Java does not have an unsigned 64 bit type. So scrape it off the wire then flip. return new BigInteger(Utils.reverseBytes(readBytes(8))); }
protected String readStr() throws ProtocolException { long length = readVarInt(); return length == 0 ? "" : Utils.toString(readBytes((int) length), "UTF-8"); // optimization for empty strings }
protected String readStr() throws ProtocolException { long length = readVarInt(); return length == 0 ? "" : Utils.toString(readBytes((int) length), "UTF-8"); // optimization for empty strings }
protected String readStr() throws ProtocolException { long length = readVarInt(); return length == 0 ? "" : Utils.toString(readBytes((int) length), "UTF-8"); // optimization for empty strings }
protected String readStr() throws ProtocolException { long length = readVarInt(); return length == 0 ? "" : Utils.toString(readBytes((int) length), "UTF-8"); // optimization for empty strings }