Package com.google.code.or.io.util

Examples of com.google.code.or.io.util.XSerializer


 
  /**
   *
   */
  public byte[] getPacketBody() {
    final XSerializer s = new XSerializer(64);
    s.writeInt(this.packetMarker, 1);
    s.writeUnsignedLong(this.affectedRows);
    s.writeUnsignedLong(this.insertId);
    s.writeInt(this.serverStatus, 2);
    s.writeInt(this.warningCount, 2);
    if(this.message != null) s.writeFixedLengthString(this.message);
    return s.toByteArray();
  }
View Full Code Here


 
  /**
   *
   */
  public byte[] getPacketBody() {
    final XSerializer s = new XSerializer(64);
    s.writeInt(this.packetMarker, 1);
    s.writeInt(this.errorCode, 2);
    s.writeFixedLengthString(this.slash);
    s.writeFixedLengthString(this.sqlState);
    s.writeFixedLengthString(this.errorMessage);
    return s.toByteArray();
  }
View Full Code Here

 
  /**
   *
   */
  public byte[] getPacketBody() throws IOException {
    final XSerializer ps = new XSerializer();
    ps.writeInt(this.command, 1);
    ps.writeFixedLengthString(this.sql);
    return ps.toByteArray();
  }
View Full Code Here

 
  /**
   *
   */
  public byte[] getPacketBody() throws IOException {
    final XSerializer ps = new XSerializer();
    ps.writeInt(this.command, 1);
    ps.writeLong(this.binlogPosition, 4);
    ps.writeInt(this.binlogFlag, 2);
    ps.writeLong(this.serverId, 4);
    ps.writeFixedLengthString(this.binlogFileName);
    return ps.toByteArray();
  }
View Full Code Here

    final UnsignedLong length = readUnsignedLong();
    return length == null ? null : readFixedLengthString(length.intValue());
  }
 
  public StringColumn readNullTerminatedString() throws IOException {
    final XSerializer s = new XSerializer(128); // 128 should be OK for most schema names
    while(true) {
      final int v = this.read();
      if(v == 0) break;
      s.writeInt(v, 1);
    }
    return StringColumn.valueOf(s.toByteArray());
  }
View Full Code Here

TOP

Related Classes of com.google.code.or.io.util.XSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.