5354555657585960616263
*/ public byte[] getPacketBody() { final XSerializer s = new XSerializer(32); s.writeUnsignedLong(this.fieldCount); if(this.extra != null) s.writeUnsignedLong(this.extra); return s.toByteArray(); } /** * */
103104105106107108109110111112113
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 { return StringColumn.valueOf(readBytes(length)); }
7374757677787980818283
if(this.initialSchema != null) s.writeNullTerminatedString(StringColumn.valueOf(this.initialSchema.getBytes(this.encoding))); // final RawPacket request = new RawPacket(); request.setSequence(1); request.setPacketBody(s.toByteArray()); request.setLength(request.getPacketBody().length); transport.getOutputStream().writePacket(request); transport.getOutputStream().flush(); //
5152535455565758596061
5758596061626364656667
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(); } /** * */
9596979899100101102103104105
8788899091929394959697
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(); } /** * */
s.writeInt(this.serverCollation, 1); s.writeInt(this.serverStatus, 2); s.writeInt(0, 13); s.writeNullTerminatedString(this.scramble2); s.writeNullTerminatedString(this.pluginProvidedData); return s.toByteArray(); } /** * */
5253545556575859606162
public byte[] getPacketBody() { final XSerializer s = new XSerializer(1024); for(StringColumn column : this.columns) { s.writeLengthCodedString(column); } return s.toByteArray(); } /** * */
6768697071727374757677
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(); } /** * */