SendMsgAck.java :  » Client » android-gadu » pl » szpadel » android » gadu » packets » Android Open Source

Android Open Source » Client » android gadu 
android gadu » pl » szpadel » android » gadu » packets » SendMsgAck.java
package pl.szpadel.android.gadu.packets;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;

public class SendMsgAck extends ReceivedPacket {

  // fields
  public int status;
  public int recipient;
  public int seq;
  
  
  public SendMsgAck(Header hdr, InputStream stream) throws IOException {
    super(hdr, stream);
  }

  public SendMsgAck(Header hdr, ReadableByteChannel channel)
      throws IOException {
    super(hdr, channel);
  }

  @Override
  protected void readFromBuffer(ByteBuffer buffer) {
    status = buffer.getInt();
    recipient = buffer.getInt();
    seq = buffer.getInt();
  }

  @Override
  public String toString() {
    return "SendMsgAck ( "+
      "status=" + status + ", " +
      "recipient=" + recipient + ", " +
      "seq=" + seq + " )";
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.