comparison src/ch/ethz/ssh2/packets/PacketIgnore.java @ 342:175c7d68f3c4

merge ganymed into mainline
author Carl Byington <carl@five-ten-sg.com>
date Thu, 31 Jul 2014 16:33:38 -0700
parents 071eccdff8ea
children
comparison
equal deleted inserted replaced
272:ce2f4e397703 342:175c7d68f3c4
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
29 payload = tw.getBytes();
30 }
31
32 public byte[] getPayload() {
33 return payload;
34 }
35 }