Stay organized with collections
Save and categorize content based on your preferences.
FixedByteArrayOutputStream
public
class
FixedByteArrayOutputStream
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.FixedByteArrayOutputStream
|
An in-memory ERROR(/OutputStream)
that only keeps a maximum amount of data.
This is implemented by keeping a circular byte array of fixed size.
Not thread safe.
Summary
Public methods |
InputStream
|
getData()
Gets a InputStream for reading collected output.
|
long
|
size()
|
void
|
write(byte[] b, int off, int len)
|
void
|
write(int data)
|
Public constructors
FixedByteArrayOutputStream
public FixedByteArrayOutputStream (int maxDataSize)
Creates a FixedByteArrayOutputStream
.
Parameters |
maxDataSize |
int : the approximate max size in bytes to keep in the output stream |
Public methods
getData
public InputStream getData ()
Gets a InputStream for reading collected output.
Not thread safe. Assumes no data will be written while being read
size
public long size ()
Returns |
long |
the number of bytes currently stored. |
write
public void write (byte[] b,
int off,
int len)
Parameters |
b |
byte |
off |
int |
len |
int |
write
public void write (int data)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]