edu.vt.middleware.crypt.io.DirectByteArrayOutputStream Maven / Gradle / Ivy
/*
$Id$
Copyright (C) 2007-2010 Virginia Tech.
All rights reserved.
SEE LICENSE FOR MORE INFORMATION
Author: Middleware Services
Email: [email protected]
Version: $Revision$
Updated: $Date$
*/
package edu.vt.middleware.crypt.io;
import java.io.ByteArrayOutputStream;
/**
* Extends {@link java.io.ByteArrayOutputStream} by allowing direct access to
* the internal byte buffer.
*
* @author Middleware Services
* @version $Revision: 3 $
*/
public class DirectByteArrayOutputStream extends ByteArrayOutputStream
{
/** Creates a new instance with a buffer of the default size. */
public DirectByteArrayOutputStream()
{
super();
}
/**
* Creates a new instance with a buffer of the given initial capacity.
*
* @param capacity Initial capacity of internal buffer.
*/
public DirectByteArrayOutputStream(final int capacity)
{
super(capacity);
}
/**
* Gets the internal byte buffer.
*
* @return Internal buffer that holds written bytes.
*/
public byte[] getBuffer()
{
return buf;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy