comparison app/src/main/java/ch/ethz/ssh2/packets/PacketIgnore.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/ch/ethz/ssh2/packets/PacketIgnore.java@071eccdff8ea
children
comparison
equal deleted inserted replaced
437:208b31032318 438:d29cce60f393
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 }