InvitationReceivedCommand.java :  » Game » tetris-mina » TetrisMina » command » concrete » Java Open Source

Java Open Source » Game » tetris mina 
tetris mina » TetrisMina » command » concrete » InvitationReceivedCommand.java
package tetrismina.command.concrete;

import tetrismina.command.AbstractTetrisCommand;

public class InvitationReceivedCommand extends AbstractTetrisCommand {

  public static final String NAME = "InvitationReceived";

  private String inviterName = "";

  public String getInviterName() {
    return inviterName;
  }

  public void setInviterName(String inviterName) {
    this.inviterName = inviterName;
  }

  @Override
  public void bodyFromBytes(byte[] bytes) throws Exception {
    setInviterName(new String(bytes));

  }

  @Override
  public byte[] bodyToBytes() throws Exception {
    return inviterName.getBytes();
  }

  @Override
  public String getName() {
    return NAME;
  }

}
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.