Code example for InputSource

Methods: setByteStream

0
	 * A function that will resolve the dtd file location to the dtd byte[] data specified. 
	 */ 
	@Override 
	public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
	{ 
		final InputSource dtdsource = new InputSource();
		if (systemId.endsWith(this.dtdFileName))
		{ 
			dtdsource.setByteStream(new ByteArrayInputStream(this.dtdData));
			return dtdsource;
		} 
 
		return null; 
	} 
 
	public String getErrorText()
	{ 
		return errorText;
	} 
 
	public void setErrorText(String errorText)