net.wimpi.modbus.io
Class BytesOutputStream
java.lang.Object
java.io.OutputStream
net.wimpi.modbus.io.FastByteArrayOutputStream
net.wimpi.modbus.io.BytesOutputStream
- All Implemented Interfaces:
- java.io.DataOutput
- public class BytesOutputStream
- extends FastByteArrayOutputStream
- implements java.io.DataOutput
Class implementing a byte array output stream with
a DataInput interface.
- Version:
- 1.2rc1 (09/11/2004)
- Author:
- Dieter Wimberger
Constructor Summary |
BytesOutputStream(byte[] buffer)
Constructs a new BytesOutputStream instance with
a given output buffer. |
BytesOutputStream(int size)
Constructs a new BytesOutputStream instance with
a new output buffer of the given size. |
Methods inherited from class net.wimpi.modbus.io.FastByteArrayOutputStream |
addSize, getBufferBytes, getBufferLength, getBufferOffset, makeSpace, size, toByteArray, toByteArray, toString, toString, write, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
close, flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.io.DataOutput |
write, write, write |
BytesOutputStream
public BytesOutputStream(int size)
- Constructs a new BytesOutputStream instance with
a new output buffer of the given size.
- Parameters:
size
- the size of the output buffer as int.
BytesOutputStream
public BytesOutputStream(byte[] buffer)
- Constructs a new BytesOutputStream instance with
a given output buffer.
- Parameters:
buffer
- the output buffer as byte[].
getBuffer
public byte[] getBuffer()
- Returns the reference to the output buffer.
- Returns:
- the reference to the byte[] output buffer.
reset
public void reset()
- Description copied from class:
FastByteArrayOutputStream
- Resets this FastByteArrayOutputStream.
- Overrides:
reset
in class FastByteArrayOutputStream
writeBoolean
public void writeBoolean(boolean v)
throws java.io.IOException
- Specified by:
writeBoolean
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeByte
public void writeByte(int v)
throws java.io.IOException
- Specified by:
writeByte
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeShort
public void writeShort(int v)
throws java.io.IOException
- Specified by:
writeShort
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeChar
public void writeChar(int v)
throws java.io.IOException
- Specified by:
writeChar
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeInt
public void writeInt(int v)
throws java.io.IOException
- Specified by:
writeInt
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeLong
public void writeLong(long v)
throws java.io.IOException
- Specified by:
writeLong
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeFloat
public void writeFloat(float v)
throws java.io.IOException
- Specified by:
writeFloat
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeDouble
public void writeDouble(double v)
throws java.io.IOException
- Specified by:
writeDouble
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeBytes
public void writeBytes(java.lang.String s)
throws java.io.IOException
- Specified by:
writeBytes
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeChars
public void writeChars(java.lang.String s)
throws java.io.IOException
- Specified by:
writeChars
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeUTF
public void writeUTF(java.lang.String str)
throws java.io.IOException
- Specified by:
writeUTF
in interface java.io.DataOutput
- Throws:
java.io.IOException
Copyright © 2002-2004 jamod development team.