Java TypesWriter Example

说明

java typeswriter示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Java

类/类型: TypesWriter

示例#1
文件: PacketGlobalForwardRequest.java项目: jadesjardins/eeglab_data_annotate_demo

  public byte[] getPayload() {
    if (payload == null) {
      TypesWriter tw = new TypesWriter();
      tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST);

      tw.writeString("tcpip-forward");
      tw.writeBoolean(wantReply);
      tw.writeString(bindAddress);
      tw.writeUINT32(bindPort);

      payload = tw.getBytes();
    }
    return payload;
  }

示例#2
文件: PacketChannelTrileadPing.java项目: alexyuyxj/SSHProxy

 public byte[] getPayload() {
   if (payload == null) {
     TypesWriter tw = new TypesWriter();
     tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
     tw.writeUINT32(recipientChannelID);
     tw.writeString("trilead-ping");
     tw.writeBoolean(true);
     payload = tw.getBytes();
   }
   return payload;
 }

示例#3
文件: PacketKexInit.java项目: minusmajun/trilead-ssh2

 public byte[] getPayload() {
   if (payload == null) {
     TypesWriter tw = new TypesWriter();
     tw.writeByte(Packets.SSH_MSG_KEXINIT);
     tw.writeBytes(kp.cookie, 0, 16);
     tw.writeNameList(kp.kex_algorithms);
     tw.writeNameList(kp.server_host_key_algorithms);
     tw.writeNameList(kp.encryption_algorithms_client_to_server);
     tw.writeNameList(kp.encryption_algorithms_server_to_client);
     tw.writeNameList(kp.mac_algorithms_client_to_server);
     tw.writeNameList(kp.mac_algorithms_server_to_client);
     tw.writeNameList(kp.compression_algorithms_client_to_server);
     tw.writeNameList(kp.compression_algorithms_server_to_client);
     tw.writeNameList(kp.languages_client_to_server);
     tw.writeNameList(kp.languages_server_to_client);
     tw.writeBoolean(kp.first_kex_packet_follows);
     tw.writeUINT32(kp.reserved_field1);
     payload = tw.getBytes();
   }
   return payload;
 }

示例#4
文件: PacketSessionPtyRequest.java项目: ReignInChaos/netconf-java

  public byte[] getPayload() {
    if (payload == null) {
      TypesWriter tw = new TypesWriter();
      tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
      tw.writeUINT32(recipientChannelID);
      tw.writeString("pty-req");
      tw.writeBoolean(wantReply);
      tw.writeString(term);
      tw.writeUINT32(character_width);
      tw.writeUINT32(character_height);
      tw.writeUINT32(pixel_width);
      tw.writeUINT32(pixel_height);
      tw.writeString(terminal_modes, 0, terminal_modes.length);

      payload = tw.getBytes();
    }
    return payload;
  }

展开阅读全文