public void processMessage(TransportMapping sourceTransport, Address incomingAddress, ByteBuffer wholeMessage) { processMessage(sourceTransport, incomingAddress, new BERInputStream(wholeMessage.duplicate())); }
public void processMessage(TransportMapping<?> sourceTransport, Address incomingAddress, ByteBuffer wholeMessage, TransportStateReference tmStateReference) { processMessage(sourceTransport, incomingAddress, new BERInputStream(wholeMessage), tmStateReference); }
public void processMessage(TransportMapping sourceTransport, Address incomingAddress, ByteBuffer wholeMessage, TransportStateReference tmStateReference) { processMessage(sourceTransport, incomingAddress, new BERInputStream(wholeMessage), tmStateReference); }
public void processMessage(TransportMapping sourceTransport, Address incomingAddress, ByteBuffer wholeMessage) { processMessage(sourceTransport, incomingAddress, new BERInputStream(wholeMessage)); }
private Object resolvOpaque(Opaque var) { //If not resolved, we will return the data as an array of bytes Object value = var.getValue(); try { byte[] bytesArray = var.getValue(); ByteBuffer bais = ByteBuffer.wrap(bytesArray); BERInputStream beris = new BERInputStream(bais); byte t1 = bais.get(); byte t2 = bais.get(); int l = BER.decodeLength(beris); if(t1 == TAG1) { if(t2 == TAG_FLOAT && l == 4) value = new Float(bais.getFloat()); else if(t2 == TAG_DOUBLE && l == 8) value = new Double(bais.getDouble()); } } catch (IOException e) { logger.error(var.toString()); } return value; }
private Object resolvOpaque(Opaque var) { // If not resolved, we will return the data as an array of bytes Object value = var.getValue(); try { byte[] bytesArray = var.getValue(); ByteBuffer bais = ByteBuffer.wrap(bytesArray); BERInputStream beris = new BERInputStream(bais); byte t1 = bais.get(); byte t2 = bais.get(); int l = BER.decodeLength(beris); if(t1 == TAG1) { if(t2 == TAG_FLOAT && l == 4) value = new Float(bais.getFloat()); else if(t2 == TAG_DOUBLE && l == 8) value = new Double(bais.getDouble()); } } catch (IOException e) { logger.error(var.toString()); } return value; }
public MessageLength getMessageLength(ByteBuffer buf) throws IOException { MutableByte type = new MutableByte(); BERInputStream is = new BERInputStream(buf); int ml = BER.decodeHeader(is, type, false); int hl = (int)is.getPosition(); MessageLength messageLength = new MessageLength(hl, ml); return messageLength; } }
public MessageLength getMessageLength(ByteBuffer buf) throws IOException { MutableByte type = new MutableByte(); BERInputStream is = new BERInputStream(buf); int ml = BER.decodeHeader(is, type, false); int hl = (int) is.getPosition(); MessageLength messageLength = new MessageLength(hl, ml); return messageLength; } }
public MessageLength getMessageLength(ByteBuffer buf) throws IOException { MutableByte type = new MutableByte(); BERInputStream is = new BERInputStream(buf); int ml = BER.decodeHeader(is, type); int hl = (int)is.getPosition(); MessageLength messageLength = new MessageLength(hl, ml); return messageLength; } }
BER.decodeHeader(new BERInputStream(entry.inAppBuffer.asReadOnlyBuffer()), new BER.MutableByte(), true); } catch (IOException iox) {
public static DHParameters getDHParametersFromBER(OctetString berValue) throws IOException { BERInputStream inputStream = new BERInputStream(ByteBuffer.wrap(berValue.getValue())); BER.MutableByte sequenceType = new BER.MutableByte(); int sequenceLength = BER.decodeHeader(inputStream, sequenceType); long headerOffset = inputStream.getPosition(); BER.MutableByte integerType = new BER.MutableByte(); BigInteger prime = BER.decodeBigInteger(inputStream, integerType); BigInteger generator = BER.decodeBigInteger(inputStream, integerType); int privateValueLength = 0; if (inputStream.available() > 0 && inputStream.getPosition() < sequenceLength + headerOffset) { privateValueLength = BER.decodeInteger(inputStream, integerType); } return new DHParameters(prime, generator, privateValueLength); }
public static DHParameters getDHParametersFromBER(OctetString berValue) throws IOException { BERInputStream inputStream = new BERInputStream(ByteBuffer.wrap(berValue.getValue())); BER.MutableByte sequenceType = new BER.MutableByte(); int sequenceLength = BER.decodeHeader(inputStream, sequenceType); long headerOffset = inputStream.getPosition(); BER.MutableByte integerType = new BER.MutableByte(); BigInteger prime = BER.decodeBigInteger(inputStream, integerType); BigInteger generator = BER.decodeBigInteger(inputStream, integerType); int privateValueLength = 0; if (inputStream.available() > 0 && inputStream.getPosition() < sequenceLength + headerOffset) { privateValueLength = BER.decodeInteger(inputStream, integerType); } return new DHParameters(prime, generator, privateValueLength); }
BERInputStream wholeMsg = new BERInputStream(buff); int length = BER.decodeHeader(wholeMsg, mutableByte); int startPos = (int)wholeMsg.getPosition();
BERInputStream scopedPDUInput = new BERInputStream(scopedPDU.rewind());
BERInputStream scopedPDUInput = new BERInputStream(scopedPDU.rewind());
BERInputStream scopedPDUInput = new BERInputStream(scopedPDU.rewind());
headerData.encodeBER(globalDataOutputStream); BERInputStream scopedPDUInput = new BERInputStream(scopedPdu.rewind());
headerData.encodeBER(globalDataOutputStream); BERInputStream scopedPDUInput = new BERInputStream(scopedPdu.rewind());
headerData.encodeBER(globalDataOutputStream); BERInputStream scopedPDUInput = new BERInputStream(scopedPdu.rewind());
ByteBuffer bis = ByteBuffer.wrap(message, scopedPDUPosition, scopedPDUHeaderLength); BERInputStream scopedPDUHeader = new BERInputStream(bis); long headerStartingPosition = scopedPDUHeader.getPosition(); int scopedPDULength =