protected InputStream sourceAsInputStream(Source source) throws NotSupportedIOTypeException
{
InputSource inputSource = SAXSource.sourceToInputSource(source);
if (inputSource == null)
{
throw new NotSupportedIOTypeException(source);
}
return inputSource.getByteStream();
}