blob: 557181e83fa54a71c2f8c2091cd1fc8ce73f83bf [file] [log] [blame]
package org.apache.kerby.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);
}
}
}