blob: 94ce003611eca170d3b421bfc16a3f1193bf1103 [file] [log] [blame]
Mark Sleed602f822007-11-28 02:45:13 +00001// Copyright (c) 2006- Facebook
2// Distributed under the Thrift Software License
3//
4// See accompanying file LICENSE or visit the Thrift site at:
5// http://developers.facebook.com/thrift/
6
7package com.facebook.thrift;
8
9import java.io.ByteArrayOutputStream;
10
11/**
12 * Class that allows access to the underlying buf without doing deep
13 * copies on it.
14 *
15 * @author Mark Slee <mcslee@facebook.com>
16 */
17public class TByteArrayOutputStream extends ByteArrayOutputStream {
18 public TByteArrayOutputStream(int size) {
19 super(size);
20 }
21
22 public byte[] get() {
23 return buf;
24 }
25
26 public int len() {
27 return count;
28 }
29}