bt.bencoding.BtParseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bt-bencoding Show documentation
Show all versions of bt-bencoding Show documentation
Library for parsing, encoding and validating bencoded documents in Java
package bt.bencoding;
/**
* BEncoded document parse exception.
*
* @since 1.0
*/
public class BtParseException extends RuntimeException {
private byte[] scannedContents;
/**
* @since 1.0
*/
public BtParseException(String message, byte[] scannedContents, Throwable cause) {
super(message, cause);
this.scannedContents = scannedContents;
}
/**
* @since 1.0
*/
public BtParseException(String message, byte[] scannedContents) {
super(message);
this.scannedContents = scannedContents;
}
/**
* Get the scanned portion of the source document.
*
* @return Scanned portion of the source document
* @since 1.0
*/
public byte[] getScannedContents() {
return scannedContents;
}
}