Package javax.jms

Examples of javax.jms.ObjectMessage.writeBytes()


            BytesMessage src = (BytesMessage) message;
            final int LEN = 100;
            byte[] buf = new byte[LEN];
            int bytesRead = src.readBytes ( buf );
            while ( bytesRead >= 0 ) {
                m.writeBytes ( buf, 0, bytesRead );
                bytesRead = src.readBytes ( buf );
            }

            ret = m;
        } else {
View Full Code Here


            TextMessage msg = TextMessage.class.cast(jmsMessage);
            msg.setText(syMessage.getContent(String.class));

        } else if (jmsMessage instanceof BytesMessage) {
            BytesMessage msg = BytesMessage.class.cast(jmsMessage);
            msg.writeBytes(syMessage.getContent(byte[].class));

        } else if (jmsMessage instanceof StreamMessage) {
            StreamMessage msg = StreamMessage.class.cast(jmsMessage);
            byte[] buffer = new byte[8192];
            int size = 0;
View Full Code Here

            int size = 0;
            if (syMessage.getContent() instanceof StreamMessage) {
                // in case the StreamMessage is passed through from JMS inbound
                StreamMessage sm = syMessage.getContent(StreamMessage.class);
                while ((size = sm.readBytes(buffer)) > 0) {
                    msg.writeBytes(buffer, 0, size);
                }
            } else {
                InputStream is = syMessage.getContent(InputStream.class);
                while ((size = is.read(buffer)) > 0) {
                    msg.writeBytes(buffer, 0, size);
View Full Code Here

                    msg.writeBytes(buffer, 0, size);
                }
            } else {
                InputStream is = syMessage.getContent(InputStream.class);
                while ((size = is.read(buffer)) > 0) {
                    msg.writeBytes(buffer, 0, size);
                }
            }

        } else if (jmsMessage instanceof MapMessage) {
            MapMessage msg = MapMessage.class.cast(jmsMessage);
View Full Code Here

            BytesMessage src = (BytesMessage) message;
            final int LEN = 100;
            byte[] buf = new byte[LEN];
            int bytesRead = src.readBytes ( buf );
            while ( bytesRead >= 0 ) {
                m.writeBytes ( buf, 0, bytesRead );
                bytesRead = src.readBytes ( buf );
            }

            ret = m;
        } else {
View Full Code Here

            BytesMessage src = (BytesMessage) message;
            final int LEN = 100;
            byte[] buf = new byte[LEN];
            int bytesRead = src.readBytes ( buf );
            while ( bytesRead >= 0 ) {
                m.writeBytes ( buf, 0, bytesRead );
                bytesRead = src.readBytes ( buf );
            }

            ret = m;
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.