org.hsqldb.lib
Class HsqlByteArrayOutputStream
java.lang.Object
java.io.OutputStream
org.hsqldb.lib.HsqlByteArrayOutputStream
- All Implemented Interfaces:
- DataOutput
- Direct Known Subclasses:
- RowOutputBase
- public class HsqlByteArrayOutputStream
- extends OutputStream
- implements DataOutput
This class is a replacement for both java.io.ByteArrayOuputStream
(without synchronization) and java.io.DataOutputStream
- Version:
- 1.7.2
- Author:
- fredt@users
Field Summary |
protected byte[] |
buf
|
protected int |
count
|
buf
protected byte[] buf
count
protected int count
HsqlByteArrayOutputStream
public HsqlByteArrayOutputStream()
HsqlByteArrayOutputStream
public HsqlByteArrayOutputStream(int size)
HsqlByteArrayOutputStream
public HsqlByteArrayOutputStream(byte[] buffer)
writeShort
public final void writeShort(int v)
- Specified by:
writeShort
in interface DataOutput
writeInt
public final void writeInt(int v)
- Specified by:
writeInt
in interface DataOutput
writeLong
public final void writeLong(long v)
- Specified by:
writeLong
in interface DataOutput
writeBytes
public final void writeBytes(String s)
- Specified by:
writeBytes
in interface DataOutput
writeFloat
public final void writeFloat(float v)
- Specified by:
writeFloat
in interface DataOutput
writeDouble
public final void writeDouble(double v)
- Specified by:
writeDouble
in interface DataOutput
writeBoolean
public void writeBoolean(boolean v)
throws IOException
- Specified by:
writeBoolean
in interface DataOutput
- Throws:
IOException
writeByte
public void writeByte(int v)
throws IOException
- Specified by:
writeByte
in interface DataOutput
- Throws:
IOException
writeChar
public void writeChar(int v)
throws IOException
- Specified by:
writeChar
in interface DataOutput
- Throws:
IOException
writeChars
public void writeChars(String s)
throws IOException
- Specified by:
writeChars
in interface DataOutput
- Throws:
IOException
writeUTF
public void writeUTF(String str)
throws IOException
- Specified by:
writeUTF
in interface DataOutput
- Throws:
IOException
flush
public void flush()
throws IOException
- does nothing
- Throws:
IOException
write
public void write(int b)
- Specified by:
write
in interface DataOutput
write
public void write(byte[] b)
throws IOException
- Specified by:
write
in interface DataOutput
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
- Specified by:
write
in interface DataOutput
writeTo
public void writeTo(OutputStream out)
throws IOException
- Throws:
IOException
reset
public void reset()
toByteArray
public byte[] toByteArray()
size
public int size()
toString
public String toString()
toString
public String toString(String enc)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
toString
public String toString(int hibyte)
close
public void close()
throws IOException
- Throws:
IOException
fill
public void fill(int b,
int len)
getBuffer
public byte[] getBuffer()
ensureRoom
protected void ensureRoom(int extra)
reset
protected void reset(int newSize)
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.