Update ID.java

Fix decode bug.
This commit is contained in:
吴晟 Wu Sheng 2017-07-21 10:44:32 +08:00 committed by GitHub
parent 8d8d4e40f7
commit 2ca2bd792c
1 changed files with 2 additions and 2 deletions

View File

@ -34,10 +34,10 @@ public class ID {
value = ByteBuffer.wrap(DECODER.decode(encodedString)).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(0);
} else if (potentialTypeChar == '$') {
encodedString = base64String.substring(index + 1, index + 9);
index += 8;
index += 9;
value = ByteBuffer.wrap(DECODER.decode(encodedString)).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer().get(0);
} else {
encodedString = base64String.substring(index + 1, index + 13);
encodedString = base64String.substring(index + 1, index + 12);
index += 12;
value = ByteBuffer.wrap(DECODER.decode(encodedString)).order(ByteOrder.LITTLE_ENDIAN).asLongBuffer().get(0);
}