QuickServer
v1.4.7

org.quickserver.util.io
Class ByteBufferInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.quickserver.util.io.ByteBufferInputStream

public class ByteBufferInputStream
extends java.io.InputStream

This is an InputStream constructed from list of ByteBuffers. This is used in non-blocking mode.

Since:
1.4.5
Author:
Akshathkumar Shetty

Constructor Summary
ByteBufferInputStream(java.util.ArrayList bufferList, ClientHandler handler, java.lang.String charset)
           
 
Method Summary
 int available()
           
 int availableOnlyInByteBuffer()
           
 void close()
           
 void dumpContent()
           
 boolean isLineReady()
          Checks if a line of String is ready to be read.
static boolean isLoggable(java.util.logging.Level level)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 java.lang.String readLine()
          Reads a line of String if ready.
static void setDebug(boolean flag)
          Sets the debug flag.
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
mark, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(java.util.ArrayList bufferList,
                             ClientHandler handler,
                             java.lang.String charset)
Method Detail

setDebug

public static void setDebug(boolean flag)
Sets the debug flag.


isLoggable

public static boolean isLoggable(java.util.logging.Level level)
Since:
1.4.7

availableOnlyInByteBuffer

public int availableOnlyInByteBuffer()

available

public int available()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

markSupported

public boolean markSupported()

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Throws:
java.io.IOException

isLineReady

public boolean isLineReady()
                    throws java.io.IOException
Checks if a line of String is ready to be read.

Throws:
java.io.IOException - if connection is lost or closed.

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Reads a line of String if ready. If line is not yet ready this will block. To find out if the line is ready use isLineReady()

Throws:
java.io.IOException
See Also:
isLineReady()

dumpContent

public void dumpContent()

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org