Top Fields Constructors Methods
javassist.bytecode

pack-priv final Class ByteStream

extends OutputStream
Class Inheritance
Imports
java.io.IOException, .OutputStream

Field Summary

Modifier and TypeField and Description
private byte[]
private int

Constructor Summary

AccessConstructor and Description
public
public
ByteStream(int size)

Method Summary

Modifier and TypeMethod and Description
public void
enlarge(int delta)

public int
public int
size()

public byte[]
public void
write(byte[]
the data.
data
)

Overrides java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream.

public void
write(byte[]
the data.
data
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

public void
write(int
the byte.
b
)

Implements abstract java.io.OutputStream.write.

Writes the specified byte to this output stream.

public void
write(int pos, int value)

public void
writeBlank(int len)

public void
writeDouble(double v)

public void
writeFloat(float v)

public void
writeInt(int i)

public void
writeInt(int pos, int value)

public void
writeLong(long i)

public void
writeShort(int s)

public void
writeShort(int pos, int value)

public void
public void
private void
writeUTF2(String s, int sLen, int offset)

Inherited from java.io.OutputStream:
closeflushnullOutputStream

Field Detail

bufback to summary
private byte[] buf
countback to summary
private int count

Constructor Detail

ByteStreamback to summary
public ByteStream()
ByteStreamback to summary
public ByteStream(int size)

Method Detail

enlargeback to summary
public void enlarge(int delta)
getPosback to summary
public int getPos()
sizeback to summary
public int size()
toByteArrayback to summary
public byte[] toByteArray()
writeback to summary
public void write(byte[] data)

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).

Parameters
data:byte[]

the data.

Annotations
@Override
writeback to summary
public void write(byte[] data, int off, int len)

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

Parameters
data:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
writeback to summary
public void write(int b)

Implements abstract java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Parameters
b:int

the byte.

Annotations
@Override
writeback to summary
public void write(int pos, int value)
writeBlankback to summary
public void writeBlank(int len)
writeDoubleback to summary
public void writeDouble(double v)
writeFloatback to summary
public void writeFloat(float v)
writeIntback to summary
public void writeInt(int i)
writeIntback to summary
public void writeInt(int pos, int value)
writeLongback to summary
public void writeLong(long i)
writeShortback to summary
public void writeShort(int s)
writeShortback to summary
public void writeShort(int pos, int value)
writeToback to summary
public void writeTo(OutputStream out) throws IOException
writeUTFback to summary
public void writeUTF(String s)
writeUTF2back to summary
private void writeUTF2(String s, int sLen, int offset)