aQute.lib.redirect.Capture Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biz.aQute.bndlib Show documentation
Show all versions of biz.aQute.bndlib Show documentation
bndlib: A Swiss Army Knife for OSGi
The newest version!
package aQute.lib.redirect;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import aQute.lib.io.ByteBufferOutputStream;
public class Capture extends OutputStream {
private final ByteBufferOutputStream bout = new ByteBufferOutputStream();
@Override
public void write(int b) throws IOException {
bout.write(b);
}
@Override
public void write(byte[] b) throws IOException {
bout.write(b);
}
@Override
public void write(byte[] b, int off, int len) throws IOException {
bout.write(b, off, len);
}
@Override
public String toString() {
return new String(bout.toByteArray(), StandardCharsets.UTF_8);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy