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

Examples of com.google.code.or.io.util.XSerializer.writeInt()


   
    //
    final XSerializer s = new XSerializer(64);
    s.writeInt(buildClientCapabilities(), 4);
    s.writeInt(this.maximumPacketLength, 4);
    s.writeInt(this.clientCollation > 0 ? this.clientCollation : ctx.getServerCollation(), 1);
    s.writeBytes((byte)0, 23); // Fixed, all 0
    s.writeNullTerminatedString(StringColumn.valueOf(this.user.getBytes(this.encoding)));
    s.writeInt(20, 1); // the length of the SHA1 encrypted password
    s.writeBytes(MySQLUtils.password41OrLater(this.password.getBytes(this.encoding), ctx.getScramble().getBytes(this.encoding)));
    if(this.initialSchema != null) s.writeNullTerminatedString(StringColumn.valueOf(this.initialSchema.getBytes(this.encoding)));
View Full Code Here


    s.writeInt(buildClientCapabilities(), 4);
    s.writeInt(this.maximumPacketLength, 4);
    s.writeInt(this.clientCollation > 0 ? this.clientCollation : ctx.getServerCollation(), 1);
    s.writeBytes((byte)0, 23); // Fixed, all 0
    s.writeNullTerminatedString(StringColumn.valueOf(this.user.getBytes(this.encoding)));
    s.writeInt(20, 1); // the length of the SHA1 encrypted password
    s.writeBytes(MySQLUtils.password41OrLater(this.password.getBytes(this.encoding), ctx.getScramble().getBytes(this.encoding)));
    if(this.initialSchema != null) s.writeNullTerminatedString(StringColumn.valueOf(this.initialSchema.getBytes(this.encoding)));
   
    //
    final RawPacket request = new RawPacket();
View Full Code Here

  /**
   *
   */
  public byte[] getPacketBody() {
    final XSerializer s = new XSerializer(32);
    s.writeInt(this.packetMarker, 1);
    s.writeInt(this.warningCount, 2);
    s.writeInt(this.serverStatus, 2);
    return s.toByteArray();
  }
 
View Full Code Here

   *
   */
  public byte[] getPacketBody() {
    final XSerializer s = new XSerializer(32);
    s.writeInt(this.packetMarker, 1);
    s.writeInt(this.warningCount, 2);
    s.writeInt(this.serverStatus, 2);
    return s.toByteArray();
  }
 
  /**
 
View Full Code Here

   */
  public byte[] getPacketBody() {
    final XSerializer s = new XSerializer(32);
    s.writeInt(this.packetMarker, 1);
    s.writeInt(this.warningCount, 2);
    s.writeInt(this.serverStatus, 2);
    return s.toByteArray();
  }
 
  /**
   *
 
View Full Code Here

  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());
  }
 
  public StringColumn readFixedLengthString(final int length) throws IOException {
View Full Code Here

    s.writeLengthCodedString(this.db);
    s.writeLengthCodedString(this.table);
    s.writeLengthCodedString(this.orginalTable);
    s.writeLengthCodedString(this.column);
    s.writeLengthCodedString(this.originalColumn);
    s.writeInt(this.fixed12, 1);
    s.writeInt(this.charset, 2);
    s.writeLong(this.fieldLength, 4);
    s.writeInt(this.fieldType, 1);
    s.writeInt(this.fieldOptions, 2);
    s.writeInt(this.decimalPrecision, 1);
View Full Code Here

    s.writeLengthCodedString(this.table);
    s.writeLengthCodedString(this.orginalTable);
    s.writeLengthCodedString(this.column);
    s.writeLengthCodedString(this.originalColumn);
    s.writeInt(this.fixed12, 1);
    s.writeInt(this.charset, 2);
    s.writeLong(this.fieldLength, 4);
    s.writeInt(this.fieldType, 1);
    s.writeInt(this.fieldOptions, 2);
    s.writeInt(this.decimalPrecision, 1);
    s.writeInt(this.reserved, 2);
View Full Code Here

    s.writeLengthCodedString(this.column);
    s.writeLengthCodedString(this.originalColumn);
    s.writeInt(this.fixed12, 1);
    s.writeInt(this.charset, 2);
    s.writeLong(this.fieldLength, 4);
    s.writeInt(this.fieldType, 1);
    s.writeInt(this.fieldOptions, 2);
    s.writeInt(this.decimalPrecision, 1);
    s.writeInt(this.reserved, 2);
    if(this.defaultValue != null) s.writeLengthCodedString(this.defaultValue);
    return s.toByteArray();
View Full Code Here

    s.writeLengthCodedString(this.originalColumn);
    s.writeInt(this.fixed12, 1);
    s.writeInt(this.charset, 2);
    s.writeLong(this.fieldLength, 4);
    s.writeInt(this.fieldType, 1);
    s.writeInt(this.fieldOptions, 2);
    s.writeInt(this.decimalPrecision, 1);
    s.writeInt(this.reserved, 2);
    if(this.defaultValue != null) s.writeLengthCodedString(this.defaultValue);
    return s.toByteArray();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.