org.apache.commons.ssl.util.ByteArrayReadLine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of not-going-to-be-commons-ssl Show documentation
Show all versions of not-going-to-be-commons-ssl Show documentation
A Java 9+ compliant fork of Not-Yet-Commons-SSL
The newest version!
package org.apache.commons.ssl.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class ByteArrayReadLine extends ReadLine {
public ByteArrayReadLine(ByteArrayInputStream in) { super(in); }
public String next() { return next(1); }
public String next(int lines) {
try {
return super.next(lines);
} catch (IOException ioe) {
// impossible since we're using ByteArrayInputStream
throw new RuntimeException("impossible", ioe);
}
}
public byte[] nextAsBytes() { return nextAsBytes(1); }
public byte[] nextAsBytes(int lines) {
try {
return super.nextAsBytes(lines);
} catch (IOException ioe) {
// impossible since we're using ByteArrayInputStream
throw new RuntimeException("impossible", ioe);
}
}
}