# HG changeset patch # User sugi # Date 1414988496 -32400 # Node ID 41d80f5e1fb243c5c246b8000283657094016c14 # Parent 212a81cf7a8603e7985c154b8009529abd6ad2e4 add flag diff -r 212a81cf7a86 -r 41d80f5e1fb2 src/main/java/alice/datasegment/ReceiveData.java --- a/src/main/java/alice/datasegment/ReceiveData.java Sun Nov 02 18:10:12 2014 +0900 +++ b/src/main/java/alice/datasegment/ReceiveData.java Mon Nov 03 13:21:36 2014 +0900 @@ -15,6 +15,7 @@ // both flag have to be true or false except DataSegment is byteArray; private boolean compressed = false; private boolean serialized = false; + private boolean byteArray = false; public ReceiveData(Object obj, boolean cFlag, boolean sFlag){ val = obj; @@ -22,6 +23,17 @@ serialized = sFlag; } + public ReceiveData(byte[] obj, boolean cFlag, boolean sFlag){ + val = obj; + byteArray = true; + compressed = cFlag; + serialized = sFlag; + } + + public boolean isByteArray(){ + return byteArray; + } + public boolean compressed(){ return compressed; }