Mercurial > hg > Database > Alice
comparison src/main/java/alice/datasegment/ReceiveData.java @ 467:6e304a7a60e7 dispose
remove white space
author | sugi |
---|---|
date | Sat, 22 Nov 2014 12:08:24 +0900 |
parents | 8434ff6a4b27 |
children | 7ef0ebb40c9b |
comparison
equal
deleted
inserted
replaced
466:268b1280dc18 | 467:6e304a7a60e7 |
---|---|
10 | 10 |
11 import alice.codesegment.SingletonMessage; | 11 import alice.codesegment.SingletonMessage; |
12 | 12 |
13 public class ReceiveData { | 13 public class ReceiveData { |
14 private Object val; | 14 private Object val; |
15 | 15 |
16 // both flag have to be true or false except DataSegment is byteArray; | 16 // both flag have to be true or false except DataSegment is byteArray; |
17 private boolean compressed = false; | 17 private boolean compressed = false; |
18 private boolean serialized = false; | 18 private boolean serialized = false; |
19 private boolean byteArray = false; | 19 private boolean byteArray = false; |
20 | 20 |
111 public byte[] unzip(byte[] input) throws IOException, DataFormatException{ | 111 public byte[] unzip(byte[] input) throws IOException, DataFormatException{ |
112 Inflater inflater = new Inflater(); | 112 Inflater inflater = new Inflater(); |
113 ByteArrayOutputStream os = new ByteArrayOutputStream(); | 113 ByteArrayOutputStream os = new ByteArrayOutputStream(); |
114 InflaterOutputStream ios = new InflaterOutputStream(os, inflater); | 114 InflaterOutputStream ios = new InflaterOutputStream(os, inflater); |
115 ios.write(input); | 115 ios.write(input); |
116 ios.finish(); | 116 ios.finish(); |
117 return os.toByteArray(); | 117 return os.toByteArray(); |
118 } | 118 } |
119 | 119 |
120 } | 120 } |