use of nu.validator.xml.TypedInputSource in project validator by validator.
the class SourceCode method initialize.
public void initialize(InputSource inputSource) {
this.uri = inputSource.getSystemId();
this.encoding = inputSource.getEncoding();
if (inputSource instanceof TypedInputSource) {
TypedInputSource typedInputSource = (TypedInputSource) inputSource;
int length = typedInputSource.getLength();
if (length == -1) {
expectedLength = 2048;
} else {
expectedLength = length;
}
this.type = typedInputSource.getType();
} else {
expectedLength = 2048;
this.type = null;
}
}
Aggregations