blob: 94ce003611eca170d3b421bfc16a3f1193bf1103 [file] [log] [blame]
// Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
package com.facebook.thrift;
import java.io.ByteArrayOutputStream;
/**
* Class that allows access to the underlying buf without doing deep
* copies on it.
*
* @author Mark Slee <mcslee@facebook.com>
*/
public class TByteArrayOutputStream extends ByteArrayOutputStream {
public TByteArrayOutputStream(int size) {
super(size);
}
public byte[] get() {
return buf;
}
public int len() {
return count;
}
}