comparison src/ch/ethz/ssh2/packets/PacketIgnore.java @ 273:91a31873c42a ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 11:21:46 -0700
parents
children 071eccdff8ea
comparison
equal deleted inserted replaced
272:ce2f4e397703 273:91a31873c42a
1 /*
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
3 * Please refer to the LICENSE.txt for licensing details.
4 */
5 package ch.ethz.ssh2.packets;
6
7 import java.io.IOException;
8
9 import ch.ethz.ssh2.PacketTypeException;
10
11 /**
12 * @author Christian Plattner
13 * @version $Id: PacketIgnore.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
14 */
15 public final class PacketIgnore {
16 private final byte[] payload;
17
18 public PacketIgnore(byte[] data) {
19 TypesWriter tw = new TypesWriter();
20 tw.writeByte(Packets.SSH_MSG_IGNORE);
21
22 if(data != null) {
23 tw.writeString(data, 0, data.length);
24 }
25 else {
26 tw.writeString("");
27 }
28 payload = tw.getBytes();
29 }
30
31 public byte[] getPayload() {
32 return payload;
33 }
34 }