Package org.xnio.streams

Examples of org.xnio.streams.ChannelInputStream


        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<String> result = new AtomicReference<String>();
        webSocketChannel.getReceiveSetter().set(new ChannelListener<WebSocketChannel>() {
            @Override
            public void handleEvent(final WebSocketChannel channel) {
                ChannelInputStream stream = null;
                try {
                    final StreamSourceFrameChannel r = channel.receive();
                    if (r != null) {
                        stream = new ChannelInputStream(r);
                        result.set(FileUtils.readFile(stream));
                        latch.countDown();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.xnio.streams.ChannelInputStream

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.