Package net.rim.device.api.util

Examples of net.rim.device.api.util.DataBuffer


        // Fill an lk array with the 'a' character.
        Arrays.fill(_receiveBuffer, (byte) 'a');

        // Initialize the buffers
        _data = new StringBuffer();
        _db = new DataBuffer();

        try {
            if (info == null) {
                // Open a port to listen for incoming connections
                _rtf =
View Full Code Here


                        pushInputStream =
                                new MDSPushInputStream(
                                        (HttpServerConnection) stream, input);

                        // Extract the data from the input stream
                        final DataBuffer db = new DataBuffer();
                        byte[] data = new byte[CHUNK_SIZE];
                        int chunk = 0;

                        while (-1 != (chunk = input.read(data))) {
                            db.write(data, 0, chunk);
                        }

                        updateMessage(data);

                        // If the push server has application level reliabilty
                        // enabled, this method call will acknowledge receipt
                        // of the push.
                        pushInputStream.accept();

                        data = db.getArray();
                    } catch (final IOException ioe) {
                        // A problem occurred with the input stream , however,
                        // the original
                        // StreamConnectionNotifier is still valid.
                        errorDialog(ioe.toString());
View Full Code Here

TOP

Related Classes of net.rim.device.api.util.DataBuffer

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.