@Override public void reset() { lastField_.clear(); lastFieldId_ = 0; }
/** * Write a struct end. This doesn't actually put anything on the wire. We use * this as an opportunity to pop the last field from the current struct off * of the field stack. */ public void writeStructEnd() throws TException { lastFieldId_ = lastField_.pop(); }
/** * Read a struct begin. There's nothing on the wire for this, but it is our * opportunity to push a new struct begin marker onto the field stack. */ public TStruct readStructBegin() throws TException { lastField_.push(lastFieldId_); lastFieldId_ = 0; return ANONYMOUS_STRUCT; }
@Override public void readMessageEnd() throws TException { realContentProtocol.readMessageEnd(); byte etx = realHeaderProtocol.readByte(); if (etx != ETX) {// 通讯协议不正确 throw new TException("通讯协议不正确(结束符)"); } }
@Override public String readString() throws TException { try { return readJSONString(false).toString("UTF-8"); } catch (UnsupportedEncodingException ex) { throw new TException("JVM DOES NOT SUPPORT UTF-8"); } }
public SoaException(TException err) { super(err); this.code = SoaBaseCode.UnKnown.getCode(); this.msg = err.getMessage(); }
public void push(short pushed) { if (vector.length == top + 1) { grow(); } vector[++top] = pushed; }
public void write(byte[] buf, int off, int len) throws TTransportException { writeBuffer_.write(buf, off, len); }
@Override public void readMessageEnd() throws TException { realContentProtocol.readMessageEnd(); byte etx = realHeaderProtocol.readByte(); if (etx != ETX) {// 通讯协议不正确 throw new TException("通讯协议不正确(结束符)"); } }
@Override public String readString() throws TException { try { return readJSONString(false).toString("UTF-8"); } catch (UnsupportedEncodingException ex) { throw new TException("JVM DOES NOT SUPPORT UTF-8"); } }
public SoaException(TException err) { super(err); this.code = SoaBaseCode.UnKnown.getCode(); this.msg = err.getMessage(); }
/** * Doesn't actually consume any wire data, just removes the last field for * this struct from the field stack. */ public void readStructEnd() throws TException { // consume the last field we read off the wire. lastFieldId_ = lastField_.pop(); }
/** * Write a struct begin. This doesn't actually put anything on the wire. We * use it as an opportunity to put special placeholder markers on the field * stack so we can get the field id deltas correct. */ public void writeStructBegin(TStruct struct) throws TException { lastField_.push(lastFieldId_); lastFieldId_ = 0; }
@Override public void reset() { lastField_.clear(); lastFieldId_ = 0; }
public void push(short pushed) { if (vector.length == top + 1) { grow(); } vector[++top] = pushed; }
public void write(byte[] buf, int off, int len) throws TTransportException { writeBuffer_.write(buf, off, len); }
/** * Write a struct end. This doesn't actually put anything on the wire. We use * this as an opportunity to pop the last field from the current struct off * of the field stack. */ public void writeStructEnd() throws TException { lastFieldId_ = lastField_.pop(); }
/** * Write a struct begin. This doesn't actually put anything on the wire. We * use it as an opportunity to put special placeholder markers on the field * stack so we can get the field id deltas correct. */ public void writeStructBegin(TStruct struct) throws TException { lastField_.push(lastFieldId_); lastFieldId_ = 0; }
/** * Doesn't actually consume any wire data, just removes the last field for * this struct from the field stack. */ public void readStructEnd() throws TException { // consume the last field we read off the wire. lastFieldId_ = lastField_.pop(); }
/** * Read a struct begin. There's nothing on the wire for this, but it is our * opportunity to push a new struct begin marker onto the field stack. */ public TStruct readStructBegin() throws TException { lastField_.push(lastFieldId_); lastFieldId_ = 0; return ANONYMOUS_STRUCT; }