Package org.apache.qpid.amqp_1_0.type

Examples of org.apache.qpid.amqp_1_0.type.Binary


            {
                _header[_received++] = buf.get();
            }
            if(_received == 8)
            {
                Binary header = new Binary(_header);
                _delegate = _headersMap.get(header);
                if(_delegate != null)
                {
                    _delegate.processBytes(ByteBuffer.wrap(_header));
                    _delegate.processBytes(buf);
View Full Code Here


        }

        ByteBuffer inDup = in.slice();
        inDup.limit(inDup.position()+size);

        Binary binary;
/*        if(isCopy && inDup.hasArray())
        {
            binary= new Binary(inDup.array(), inDup.arrayOffset()+inDup.position(),size);
        }
        else
        {*/
            byte[] buf = new byte[size];
            inDup.get(buf);
            binary = new Binary(buf);
  /*      }*/

        in.position(in.position()+size);


View Full Code Here

    private Object generateMessageId()
    {
        UUID uuid = UUID.randomUUID();
        final String messageIdString = uuid.toString();
        return _session.getConnection().useBinaryMessageId() ? new Binary(messageIdString.getBytes()) : messageIdString;
    }
View Full Code Here

                                                (String) ((AmqpValue)bodySection).getValue(), footer, _session);
            }
            else if(bodySection instanceof AmqpValue && ((AmqpValue)bodySection).getValue() instanceof Binary)
            {

                Binary value = (Binary) ((AmqpValue) bodySection).getValue();
                message = new BytesMessageImpl(header, messageAnnotations, properties, appProperties,
                                               new Data(value), footer, _session);
            }
            else if(bodySection instanceof Data)
            {
View Full Code Here

            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(serializable);
            oos.flush();
            oos.close();

            _objectData = new Data(new Binary(baos.toByteArray()));

        }
        catch (IOException e)
        {
            e.printStackTrace()//TODO
View Full Code Here

        if(_objectData == null)
        {
            return null;
        }

        Binary data = _objectData.getValue();

        try
        {
            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data.getArray(), data.getArrayOffset(), data.getLength()));
            return (Serializable) ois.readObject();
        }
        catch (IOException e)
        {
            JMSException jmsException = new JMSException(e.getMessage());
View Full Code Here


            Sender s = session.createSender(queue, 10);

            Message message = new Message("dump me");
            message.setDeliveryTag(new Binary("dump".getBytes()));

            s.send(message);

            s.close();
            session.close();
View Full Code Here

        {
            val = new byte[length];
            System.arraycopy(bytes,offset,val,0,length);
        }

        put(name, new Binary(val));
    }
View Full Code Here

                            System.arraycopy(origBytes,0,bytes,0,origBytes.length);
                            for(int x = origBytes.length; x < bytes.length; x++)
                            {
                                bytes[x] = (byte) '.';
                            }
                            bodySection = new Data(new Binary(bytes));
                        }
                        else
                        {
                            bodySection = new AmqpValue(message + " " + i);
                        }
View Full Code Here

                for(String fileName : unsettledFiles)
                {
                    File aFile = new File(tmpDirectory, fileName);
                    if(aFile.canRead() && aFile.canWrite())
                    {
                        Binary deliveryTag = new Binary(md5.digest(fileName.getBytes()));
                        unsettled.put(deliveryTag, null);
                        unsettledFileNames.put(deliveryTag, fileName);
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.qpid.amqp_1_0.type.Binary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.