Code example for StringBufferInputStream

0
	 
	// 
	// Helper(s) 
	// 
	public static DDocument getDocument(final String xml) {
		return getDocument(new StringBufferInputStream(xml)) ;
	} 
	public static DDocument getDocument( 
		final Class<?> anchor, final String resourceXml)
	{ 
		return getDocument(FileUtils.getResourceString(anchor, resourceXml)) ;
	} 
	public static DDocument getDocument(final InputStream inputStream) {
		DDocumentBuilder builder = new DDocumentBuilder() ;
		try {	 
			return (DDocument)builder.parse(inputStream) ;
		} 
		catch(Exception e) {
			throw new DsfRuntimeException(e) ;
		} 
	}