⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datahead.java

📁 手机游戏
💻 JAVA
字号:
package cardserver;

/**
 * <p>Title: CardClient</p>
 *
 * <p>Description: lizhenpeng</p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: LP&P</p>
 *
 * @author lipeng
 * @version 1.0
 */
import java.io.*;
public class DataHead
{
  public DataHead()
  {
  }
  byte[] getBytes()
  {
    byte[] data = null;
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(bos);
    try
    {
      dos.writeChar(command);
      dos.writeChar(size);
    }
    catch(Exception e)
    {
    }
    data = bos.toByteArray();
    return data;
  }
  void FillData(byte[]data,int index)
  {
    ByteArrayInputStream bis = new ByteArrayInputStream(data,index,4);
    DataInputStream dis = new DataInputStream(bis);
    try
    {
      command=dis.readChar();
      size=dis.readChar();
    }
    catch(Exception e)
    {
    }
  }
  public char command;
  public char size;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -