Package org.apache.qpid.util

Examples of org.apache.qpid.util.ByteBufferInputStream


{
    public TestMessageMetaData createMetaData(ByteBuffer buf)
    {
        try
        {
            ByteBufferInputStream bbis = new ByteBufferInputStream(buf);
            DataInputStream dais = new DataInputStream(bbis);

            long id = EncodingUtils.readLong(dais);
            int size = EncodingUtils.readInteger(dais);
View Full Code Here


    private Serializable read(final ByteBuffer data) throws IOException, ClassNotFoundException
    {
        Serializable result = null;
        if (data != null && data.hasRemaining())
        {
            ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new ByteBufferInputStream(data));
            result = (Serializable) in.readObject();
        }
        return result;
    }
View Full Code Here

                FieldTable argumentsFT = null;
                if(buf != null)
                {
                    try
                    {
                        argumentsFT = new FieldTable(new DataInputStream(new ByteBufferInputStream(buf)),buf.limit());
                    }
                    catch (IOException e)
                    {
                        throw new RuntimeException("IOException should not be thrown here", e);
                    }
View Full Code Here

                FieldTable argumentsFT = null;
                if(buf != null)
                {
                    try
                    {
                        argumentsFT = new FieldTable(new DataInputStream(new ByteBufferInputStream(buf)),buf.limit());
                    }
                    catch (IOException e)
                    {
                        throw new RuntimeException("IOException should not be thrown here", e);
                    }
View Full Code Here

        public MessageMetaData createMetaData(ByteBuffer buf)
        {
            try
            {
                ByteBufferInputStream bbis = new ByteBufferInputStream(buf);
                DataInputStream dais = new DataInputStream(bbis);
                int size = EncodingUtils.readInteger(dais);
                ContentHeaderBody chb = ContentHeaderBody.createFromBuffer(dais, size);
                final AMQShortString exchange = EncodingUtils.readAMQShortString(dais);
                final AMQShortString routingKey = EncodingUtils.readAMQShortString(dais);
View Full Code Here

                FieldTable argumentsFT = null;
                if(buf != null)
                {
                    try
                    {
                        argumentsFT = new FieldTable(new DataInputStream(new ByteBufferInputStream(buf)),buf.limit());
                    }
                    catch (IOException e)
                    {
                        throw new RuntimeException("IOException should not be thrown here", e);
                    }
View Full Code Here

                FieldTable argumentsFT = null;
                if(buf != null)
                {
                    try
                    {
                        argumentsFT = new FieldTable(new DataInputStream(new ByteBufferInputStream(buf)),buf.limit());
                    }
                    catch (IOException e)
                    {
                        throw new RuntimeException("IOException should not be thrown here", e);
                    }
View Full Code Here

        public MessageMetaData createMetaData(ByteBuffer buf)
        {
            try
            {
                ByteBufferInputStream bbis = new ByteBufferInputStream(buf);
                DataInputStream dais = new DataInputStream(bbis);
                int size = EncodingUtils.readInteger(dais);
                ContentHeaderBody chb = ContentHeaderBody.createFromBuffer(dais, size);
                final AMQShortString exchange = EncodingUtils.readAMQShortString(dais);
                final AMQShortString routingKey = EncodingUtils.readAMQShortString(dais);
View Full Code Here

    private Serializable read(final ByteBuffer data) throws IOException, ClassNotFoundException
    {
        Serializable result = null;
        if (data != null && data.hasRemaining())
        {
            ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new ByteBufferInputStream(data));
            try
            {
                result = (Serializable) in.readObject();
            }
            finally
View Full Code Here

        _contentSize = msg.getMetaData().getContentSize();
        ByteBuffer buf = msg.getContent(0, _contentSize);

        try
        {
            ObjectInputStream is = new ObjectInputStream(new ByteBufferInputStream(buf));
            _messageBody = is.readObject();

        }
        catch (IOException e)
        {
View Full Code Here

TOP

Related Classes of org.apache.qpid.util.ByteBufferInputStream

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.