org.objectweb.cjdbc.common.stream
Class CJDBCOutputStream
java.lang.Object
org.objectweb.cjdbc.common.stream.CJDBCOutputStream
- public class CJDBCOutputStream
- extends java.lang.Object
ObjectOutputStream to use between the controller and the driver.
- Author:
- Nicolas Modrzyk
- See Also:
CJDBCStream
Constructor Summary |
CJDBCOutputStream(java.io.OutputStream out)
Creates a new CJDBCOutputStream from the given input stream. |
CJDBCOutputStream(java.net.Socket socket)
Creates a new CJDBCOutputStream object for statistics on
sockets |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
output
private java.io.ObjectOutputStream output
bytesWritten
private long bytesWritten
socket
private java.net.Socket socket
useCompression
private boolean useCompression
speed
private long speed
dateCreated
private long dateCreated
unshared
private int unshared
CJDBCOutputStream
public CJDBCOutputStream(java.net.Socket socket)
throws java.io.IOException,
java.io.StreamCorruptedException
- Creates a new
CJDBCOutputStream
object for statistics on
sockets
- Parameters:
socket
- socket to monitor
- Throws:
java.io.IOException
- if an IO error occurs
java.io.StreamCorruptedException
- if an error occurs
CJDBCOutputStream
public CJDBCOutputStream(java.io.OutputStream out)
throws java.io.IOException,
java.io.StreamCorruptedException
- Creates a new CJDBCOutputStream from the given input stream.
- Parameters:
out
- outputstream to wrap
- Throws:
java.io.IOException
- if new ObjectInputStream()
throws
anException
java.io.StreamCorruptedException
- same as above
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.flush()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.close()
writeObject
public void writeObject(java.lang.Object obj)
throws java.io.IOException
- Parameters:
obj
- an Object to write to the stream
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.writeObject(java.lang.Object)
writeUTF
public void writeUTF(java.lang.String string)
throws java.io.IOException
- Parameters:
string
- a String to write in UTF form to the stream
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.writeUTF(java.lang.String)
writeInt
public void writeInt(int value)
throws java.io.IOException
- Parameters:
value
- an int value to write to the stream
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.writeInt(int)
writeLong
public void writeLong(long value)
throws java.io.IOException
- Parameters:
value
- a long value to write to the stream
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.writeLong(long)
writeBoolean
public void writeBoolean(boolean value)
throws java.io.IOException
- Parameters:
value
- a boolean value to write to the stream
- Throws:
java.io.IOException
- if an error occurs- See Also:
ObjectOutputStream.writeBoolean(boolean)
getBytesWritten
public long getBytesWritten()
- Returns:
- Returns the bytesWritten.
getSocket
public java.net.Socket getSocket()
- Returns:
- Returns the socket.
getDateCreated
public long getDateCreated()
- Returns:
- Returns the dateCreated.
getUseCompression
public boolean getUseCompression()
- Returns:
- Returns the useCompression.
getSpeed
public long getSpeed()
- Returns:
- Returns the speed.
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.