19 package org.sleuthkit.autopsy.coordinationservice;
21 import java.nio.BufferUnderflowException;
22 import java.nio.ByteBuffer;
56 if(nodeData == null || nodeData.length == 0) {
58 this.errorsOccurred =
false;
63 ByteBuffer buffer = ByteBuffer.wrap(nodeData);
65 if (buffer.hasRemaining()) {
66 this.version = buffer.getInt();
73 byte flags = buffer.get();
74 this.errorsOccurred = (flags < 0);
76 }
catch (BufferUnderflowException ex) {
116 ByteBuffer buffer = ByteBuffer.allocate(5);
118 buffer.putInt(this.version);
119 buffer.put((byte)(this.errorsOccurred ? 0x80 : 0));
122 byte[] array =
new byte[buffer.position()];
124 buffer.get(array, 0, array.length);
138 super(message, cause);
InvalidDataException(String message)
static final int CURRENT_VERSION
static int getCurrentVersion()
boolean getErrorsOccurred()
InvalidDataException(String message, Throwable cause)
void setErrorsOccurred(boolean errorsOccurred)
static final long serialVersionUID
CaseNodeData(byte[] nodeData)