| | |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * Copyright 2014 ForgeRock AS |
| | | * Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | return bytes.get(); |
| | | return bytes.readByte(); |
| | | } |
| | | catch (IndexOutOfBoundsException e) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | return bytes.getShort(); |
| | | return bytes.readShort(); |
| | | } |
| | | catch (IndexOutOfBoundsException e) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | return bytes.getInt(); |
| | | return bytes.readInt(); |
| | | } |
| | | catch (IndexOutOfBoundsException e) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | return bytes.getLong(); |
| | | return bytes.readLong(); |
| | | } |
| | | catch (IndexOutOfBoundsException e) |
| | | { |
| | |
| | | final int offset = findZeroSeparator(); |
| | | if (offset > 0) |
| | | { |
| | | final String s = bytes.getString(offset); |
| | | final String s = bytes.readStringUtf8(offset); |
| | | skipZeroSeparator(); |
| | | return s; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | return CSN.valueOf(bytes.getByteSequence(CSN.BYTE_ENCODING_LENGTH)); |
| | | return CSN.valueOf(bytes.readByteSequence(CSN.BYTE_ENCODING_LENGTH)); |
| | | } |
| | | catch (IndexOutOfBoundsException e) |
| | | { |