Mercurial > hg > Database > Alice
changeset 457:41d80f5e1fb2 dispose
add flag
author | sugi |
---|---|
date | Mon, 03 Nov 2014 13:21:36 +0900 |
parents | 212a81cf7a86 |
children | bcf6f4a6fcd0 |
files | src/main/java/alice/datasegment/ReceiveData.java |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }