public Object getObject(boolean unzip) throws IOException, ClassNotFoundException { if (isBytes()) { return this.part; } else { return CacheServerHelper.deserialize((byte[])this.part, unzip); } } public Object getObject() throws IOException, ClassNotFoundException {
public Object getObject(boolean unzip) throws IOException, ClassNotFoundException { if (isBytes()) { return this.part; } else { if (this.version != null) { return CacheServerHelper.deserialize((byte[])this.part, this.version, unzip); } else { return CacheServerHelper.deserialize((byte[])this.part, unzip); } } } public Object getObject() throws IOException, ClassNotFoundException {
public String getString() { if (this.part == null) { return null; } if (!isBytes()) { Assert.assertTrue(false, "expected String part to be of type BYTE, part =" + this.toString()); } return CacheServerHelper.fromUTF((byte[])this.part); }
public String getString() { if (this.part == null) { return null; } if (!isBytes()) { Assert.assertTrue(false, "expected String part to be of type BYTE, part =" + this.toString()); } return CacheServerHelper.fromUTF((byte[])this.part); }
public int getInt() { if (!isBytes()) { Assert.assertTrue(false, "expected int part to be of type BYTE, part = " + this.toString()); } if (getLength() != 4) { Assert.assertTrue(false, "expected int length to be 4 but it was " + getLength() + "; part = " + this.toString()); } byte[] bytes = getSerializedForm(); return (((bytes[0]) << 24) & 0xFF000000) | (((bytes[1]) << 16) & 0x00FF0000) | (((bytes[2]) << 8) & 0x0000FF00) | ((bytes[3]) & 0x000000FF); }
public int getInt() { if (!isBytes()) { Assert.assertTrue(false, "expected int part to be of type BYTE, part = " + this.toString()); } if (getLength() != 4) { Assert.assertTrue(false, "expected int length to be 4 but it was " + getLength() + "; part = " + this.toString()); } byte[] bytes = getSerializedForm(); return decodeInt(bytes, 0); }
public long getLong() { if (!isBytes()) { Assert.assertTrue(false, "expected long part to be of type BYTE, part = " + this.toString()); } if (getLength() != 8) { Assert.assertTrue(false, "expected long length to be 8 but it was " + getLength() + "; part = " + this.toString()); } byte[] bytes = getSerializedForm(); return ((((long)bytes[0]) << 56) & 0xFF00000000000000l) | ((((long)bytes[1]) << 48) & 0x00FF000000000000l) | ((((long)bytes[2]) << 40) & 0x0000FF0000000000l) | ((((long)bytes[3]) << 32) & 0x000000FF00000000l) | ((((long)bytes[4]) << 24) & 0x00000000FF000000l) | ((((long)bytes[5]) << 16) & 0x0000000000FF0000l) | ((((long)bytes[6]) << 8) & 0x000000000000FF00l) | ( bytes[7] & 0x00000000000000FFl); }
public long getLong() { if (!isBytes()) { Assert.assertTrue(false, "expected long part to be of type BYTE, part = " + this.toString()); } if (getLength() != 8) { Assert.assertTrue(false, "expected long length to be 8 but it was " + getLength() + "; part = " + this.toString()); } byte[] bytes = getSerializedForm(); return ((((long)bytes[0]) << 56) & 0xFF00000000000000l) | ((((long)bytes[1]) << 48) & 0x00FF000000000000l) | ((((long)bytes[2]) << 40) & 0x0000FF0000000000l) | ((((long)bytes[3]) << 32) & 0x000000FF00000000l) | ((((long)bytes[4]) << 24) & 0x00000000FF000000l) | ((((long)bytes[5]) << 16) & 0x0000000000FF0000l) | ((((long)bytes[6]) << 8) & 0x000000000000FF00l) | ( bytes[7] & 0x00000000000000FFl); }