QuickServer
v1.4.5

org.quickserver.util.io
Class ByteBufferOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.quickserver.util.io.ByteBufferOutputStream

public class ByteBufferOutputStream
extends java.io.OutputStream

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

Since:
1.4.5
Author:
Akshathkumar Shetty

Constructor Summary
ByteBufferOutputStream(java.util.ArrayList bufferList, ClientHandler handler)
          Creates a new ByteBufferOutputStream using the given list as its base and ClientHandler as the target channel.
 
Method Summary
 void close()
           
 void flush()
           
static void setDebug(boolean flag)
          Sets the debug flag.
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferOutputStream

public ByteBufferOutputStream(java.util.ArrayList bufferList,
                              ClientHandler handler)
Creates a new ByteBufferOutputStream using the given list as its base and ClientHandler as the target channel.

Method Detail

setDebug

public static void setDebug(boolean flag)
Sets the debug flag. When debug is set to true one can see number of bytes written.


close

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

flush

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

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

write

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

QuickServer
v1.4.5

Copyright © 2003-2005 QuickServer.org