comparison src/ch/ethz/ssh2/packets/PacketServiceRequest.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
30 return serviceName; 30 return serviceName;
31 } 31 }
32 32
33 public PacketServiceRequest(byte payload[]) throws IOException { 33 public PacketServiceRequest(byte payload[]) throws IOException {
34 this.payload = payload; 34 this.payload = payload;
35
36 TypesReader tr = new TypesReader(payload); 35 TypesReader tr = new TypesReader(payload);
37
38 int packet_type = tr.readByte(); 36 int packet_type = tr.readByte();
39 37
40 if(packet_type != Packets.SSH_MSG_SERVICE_REQUEST) { 38 if (packet_type != Packets.SSH_MSG_SERVICE_REQUEST) {
41 throw new PacketTypeException(packet_type); 39 throw new PacketTypeException(packet_type);
42 } 40 }
43 41
44 serviceName = tr.readString(); 42 serviceName = tr.readString();
45 43
46 if(tr.remain() != 0) { 44 if (tr.remain() != 0) {
47 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); 45 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type)));
48 } 46 }
49 } 47 }
50 48
51 public byte[] getPayload() { 49 public byte[] getPayload() {