Package org.mortbay.io.nio

Examples of org.mortbay.io.nio.IndirectNIOBuffer


                ByteBuffer byteBuffer=(ByteBuffer)value;
                synchronized (byteBuffer)
                {
                    NIOBuffer buffer = byteBuffer.isDirect()
                        ?(NIOBuffer)new DirectNIOBuffer(byteBuffer,true)
                        :(NIOBuffer)new IndirectNIOBuffer(byteBuffer,true);
                    ((HttpConnection.Output)getServletResponse().getOutputStream()).sendResponse(buffer);
                }
            }
            catch (IOException e)
            {
View Full Code Here


                ByteBuffer byteBuffer=(ByteBuffer)value;
                synchronized (byteBuffer)
                {
                    NIOBuffer buffer = byteBuffer.isDirect()
                        ?(NIOBuffer)new DirectNIOBuffer(byteBuffer,true)
                        :(NIOBuffer)new IndirectNIOBuffer(byteBuffer,true);
                    ((HttpConnection.Output)getServletResponse().getOutputStream()).sendResponse(buffer);
                }
            }
            catch (IOException e)
            {
View Full Code Here

                ByteBuffer byteBuffer=(ByteBuffer)value;
                synchronized (byteBuffer)
                {
                    NIOBuffer buffer = byteBuffer.isDirect()
                        ?(NIOBuffer)new DirectNIOBuffer(byteBuffer,true)
                        :(NIOBuffer)new IndirectNIOBuffer(byteBuffer,true);
                    ((HttpConnection.Output)getServletResponse().getOutputStream()).sendResponse(buffer);
                }
            }
            catch (IOException e)
            {
View Full Code Here

                try
                {
                    Connector connector = HttpConnection.getCurrentConnection().getConnector();
                    buffer = ((NIOConnector)connector).getUseDirectBuffers()?
                            (NIOBuffer)new DirectNIOBuffer((int)length):
                            (NIOBuffer)new IndirectNIOBuffer((int)length);
                               
                }
                catch(OutOfMemoryError e)
                {
                    Log.warn(e.toString());
                    Log.debug(e);
                    buffer = new IndirectNIOBuffer((int) length);
                }
                buffer.readFrom(is,(int)length);
                is.close();
            }
            content.setBuffer(buffer);
View Full Code Here

TOP

Related Classes of org.mortbay.io.nio.IndirectNIOBuffer

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.