All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ma.vi.base.io.DirectAccessByteArrayOutputStream Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2018 Vikash Madhow
 */

package ma.vi.base.io;

import java.io.ByteArrayOutputStream;

/**
 * Same as java.io.ByteArrayOutputStream but provides public access to the underlying byte array. This is useful when
 * you do not want a copy of underlying byte buffer made (which toByteArray() method does).
 *
 * @author [email protected]
 */
public class DirectAccessByteArrayOutputStream extends ByteArrayOutputStream {
  public byte[] getBuffer() {
    return buf;
  }

  public int getCount() {
    return count;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy