
org.webpieces.httpparser.impl.ByteArrayOutStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-parser1_1 Show documentation
Show all versions of http-parser1_1 Show documentation
A re-usable asynchronous http 1.1 parser that can be used with any nio client
package org.webpieces.httpparser.impl;
import java.io.IOException;
import java.io.OutputStream;
public class ByteArrayOutStream extends OutputStream {
private byte[] data;
private int index = 0;
public ByteArrayOutStream(byte[] data) {
this.data = data;
}
@Override
public void write(int b) throws IOException {
data[index] = (byte) b;
}
@Override
public void write(byte[] b) throws IOException {
super.write(b);
}
@Override
public void write(byte[] b, int off, int len) throws IOException {
super.write(b, off, len);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy