public boolean readBool() throws TException { return (readByte() == 1); }
public boolean readBool() throws TException { return (readByte() == 1); }
public TField readFieldBegin() throws TException { byte type = readByte(); short id = type == TType.STOP ? 0 : readI16(); return new TField("", type, id); }
public TField readFieldBegin() throws TException { byte type = readByte(); short id = type == TType.STOP ? 0 : readI16(); return new TField("", type, id); }
public TList readListBegin() throws TException { TList list = new TList(readByte(), readI32()); checkContainerReadLength(list.size); return list; }
public TSet readSetBegin() throws TException { TSet set = new TSet(readByte(), readI32()); checkContainerReadLength(set.size); return set; }
public TList readListBegin() throws TException { TList list = new TList(readByte(), readI32()); checkContainerReadLength(list.size); return list; }
public TSet readSetBegin() throws TException { TSet set = new TSet(readByte(), readI32()); checkContainerReadLength(set.size); return set; }
/** * Reading methods. */ public TMessage readMessageBegin() throws TException { int size = readI32(); if (size < 0) { int version = size & VERSION_MASK; if (version != VERSION_1) { throw new TProtocolException(TProtocolException.BAD_VERSION, "Bad version in readMessageBegin"); } return new TMessage(readString(), (byte)(size & 0x000000ff), readI32()); } else { if (strictRead_) { throw new TProtocolException(TProtocolException.BAD_VERSION, "Missing version in readMessageBegin, old client?"); } return new TMessage(readStringBody(size), readByte(), readI32()); } }
/** * Reading methods. */ public TMessage readMessageBegin() throws TException { int size = readI32(); if (size < 0) { int version = size & VERSION_MASK; if (version != VERSION_1) { throw new TProtocolException(TProtocolException.BAD_VERSION, "Bad version in readMessageBegin"); } return new TMessage(readString(), (byte)(size & 0x000000ff), readI32()); } else { if (strictRead_) { throw new TProtocolException(TProtocolException.BAD_VERSION, "Missing version in readMessageBegin, old client?"); } return new TMessage(readStringBody(size), readByte(), readI32()); } }