Initial commit from SVN.

This commit is contained in:
wcrisman
2014-05-30 10:31:51 -07:00
commit b45e56b890
1968 changed files with 370949 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
package com.de22.javabytecode.io;
import java.io.IOException;
import com.common.io.*;
/**
* Copyright Wynne Crisman 1999,2006<p>
*/
public class ByteCodeOutputStream extends StandardOutputStream {
/**
* ByteCodeOutputStream constructor.
* The size of the initial buffer in bytes.
*/
public ByteCodeOutputStream(int bufferSize) {
super(new BufferedOutputStream(new ByteArrayOutputStream(bufferSize, false)));
}//ByteCodeOutputStream()//
/**
* ByteCodeOutputStream constructor.
* @param outputStream The buffered output stream to wrapper.
*/
protected ByteCodeOutputStream(BufferedOutputStream outputStream) {
super(outputStream);
}//ByteCodeOutputStream()//
/**
* @see BufferedOutputStream.getByteIndex()
*/
public int getByteIndex() {
return ((BufferedOutputStream) getOutputStream()).getByteIndex();
}//getByteIndex()//
/**
* @see BufferedOutputStream.getInsertOutputStream(int)
*/
public ByteCodeOutputStream getInsertOutputStream(int reservedByteCount) throws IOException {
return new ByteCodeOutputStream(((BufferedOutputStream) getOutputStream()).getInsertOutputStream(reservedByteCount));
}//getInsertOutputStream()//
/**
* @see BufferedOutputStream.getInsertOutputStream(int, int)
*/
public ByteCodeOutputStream getInsertOutputStream(int bufferSize, int incrementSize) throws IOException {
return new ByteCodeOutputStream(((BufferedOutputStream) getOutputStream()).getInsertOutputStream(bufferSize, incrementSize));
}//getInsertOutputStream()//
/**
* @see BufferedOutputStream.getOutputStreamLocation()
*/
public IOutputStreamLocation getOutputStreamLocation() throws IOException {
return ((BufferedOutputStream) getOutputStream()).getOutputStreamLocation();
}//getOutputStreamLocation()//
/**
* @see ByteArrayOutputStream.toByteArray()
*/
public byte[] toByteArray() throws IOException {
return ((BufferedOutputStream) getOutputStream()).toByteArray();
}//toByteArray()//
}//ByteCodeOutputStream//