public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
private void stringFormArj(StringBuffer s, byte[] uid) { try { DataByteArrayInputStream byteArrayInputStream = new DataByteArrayInputStream(uid); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); } catch (Exception ignored) { stringFormDefault(s, uid); } }
private void initFromEncodedBytes() throws IOException { DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXidBytes); inputStream.skipBytes(10); formatId = inputStream.readInt(); int globalLength = inputStream.readShort(); globalTransactionId = new byte[globalLength]; try { inputStream.read(globalTransactionId); branchQualifier = new byte[inputStream.available()]; inputStream.read(branchQualifier); } catch (IOException fatal) { throw new RuntimeException(this + ", failed to decode:", fatal); } }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
int size = controlIs.readInt(); if (size < 0 || size > Integer.MAX_VALUE - (BATCH_CONTROL_RECORD_SIZE + EOF_RECORD.length)) { return -2;
public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
private void stringFormArj(StringBuffer s, byte[] uid) { try { DataByteArrayInputStream byteArrayInputStream = new DataByteArrayInputStream(uid); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); } catch (Exception ignored) { stringFormDefault(s, uid); } }
private void stringFormArj(StringBuffer s, byte[] uid) { try { DataByteArrayInputStream byteArrayInputStream = new DataByteArrayInputStream(uid); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); } catch (Exception ignored) { stringFormDefault(s, uid); } }
private void stringFormArj(StringBuffer s, byte[] uid) { try { DataByteArrayInputStream byteArrayInputStream = new DataByteArrayInputStream(uid); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Long.toString(byteArrayInputStream.readLong(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); s.append(':'); s.append(Integer.toString(byteArrayInputStream.readInt(), 16)); } catch (Exception ignored) { stringFormDefault(s, uid); } }
public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
private void initFromEncodedBytes() throws IOException { DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXidBytes); inputStream.skipBytes(10); formatId = inputStream.readInt(); int globalLength = inputStream.readShort(); globalTransactionId = new byte[globalLength]; try { inputStream.read(globalTransactionId); branchQualifier = new byte[inputStream.available()]; inputStream.read(branchQualifier); } catch (IOException fatal) { throw new RuntimeException(this + ", failed to decode:", fatal); } }
private void initFromEncodedBytes() throws IOException { DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXidBytes); inputStream.skipBytes(10); formatId = inputStream.readInt(); int globalLength = inputStream.readShort(); globalTransactionId = new byte[globalLength]; try { inputStream.read(globalTransactionId); branchQualifier = new byte[inputStream.available()]; inputStream.read(branchQualifier); } catch (IOException fatal) { throw new RuntimeException(this + ", failed to decode:", fatal); } }
private void initFromEncodedBytes() throws IOException { DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXidBytes); inputStream.skipBytes(10); formatId = inputStream.readInt(); int globalLength = inputStream.readShort(); globalTransactionId = new byte[globalLength]; try { inputStream.read(globalTransactionId); branchQualifier = new byte[inputStream.available()]; inputStream.read(branchQualifier); } catch (IOException fatal) { throw new RuntimeException(this + ", failed to decode:", fatal); } }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
int size = controlIs.readInt(); if (size < 0 || size > Integer.MAX_VALUE - (BATCH_CONTROL_RECORD_SIZE + EOF_RECORD.length)) { return -2;