/** * Generate the unique key. * This key must be unique inside the space of this component. * * @return The generated key hashes the src */ public Serializable getKey() { return this.inputSource.getURI(); }
/** * @see org.apache.excalibur.source.Source#getURI() */ public String getURI() { return this.wrappedSource.getURI(); }
/** * @see org.apache.excalibur.source.Source#getURI() */ public final String getURI() { return this.source.getURI(); }
/** * Generate the unique key. * This key must be unique inside the space of this component. * * @return The generated key hashes the src */ public Serializable getKey() { return inputSource.getURI(); }
/** * @see org.springframework.core.io.Resource#getURL() */ public URL getURL() throws IOException { return new URL(this.source.getURI()); }
/** * @see org.apache.excalibur.source.TraversableSource#getName() */ public String getName() { final String uri = this.wrappedSource.getURI(); return uri.substring(uri.lastIndexOf('/')+1); }
public URI getURI() throws IOException { try { return new URI(this.source.getURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Exception because of the URI syntax."); ioe.initCause(e); throw ioe; } }
/** * <p>Generate the unique key.</p> */ public Serializable getKey() { StringBuffer key = new StringBuffer(this.inputSource.getURI()); if (this.columns != null) key.append("headers"); key.append(separator); key.append(maxrecords); key.append(escape); return key; }
/** * <p>Generate the unique key.</p> */ public Serializable getKey() { StringBuffer key = new StringBuffer(this.inputSource.getURI()); if (this.columns != null) key.append("headers"); key.append(separator); key.append(maxrecords); key.append(escape); return key; }
protected CSVReader(Source source, String encoding, int buffer) throws IOException { InputStream stream = source.getInputStream(); Reader reader = new InputStreamReader(stream, encoding); this.input = new BufferedReader(reader, buffer); this.uri = source.getURI(); }
/** * @see org.springframework.core.io.Resource#createRelative(java.lang.String) */ public Resource createRelative(String uri) throws IOException { int pos = this.source.getURI().lastIndexOf('/'); return new SourceResource(this.resolver.resolveURI(uri, this.source.getURI().substring(0, pos), null), this.resolver); }
protected CSVReader(Source source, String encoding, int buffer) throws IOException { InputStream stream = source.getInputStream(); Reader reader = new InputStreamReader(stream, encoding); this.input = new BufferedReader(reader, buffer); this.uri = source.getURI(); }
/** * Return a new <code>InputSource</code> object that uses the * <code>InputStream</code> and the system ID of the <code>Source</code> * object. * * @throws IOException * if I/O error occured. */ private static InputSource getInputSource(final Source source) throws IOException, SourceException { final InputSource newObject = new InputSource(source.getInputStream()); newObject.setSystemId(source.getURI()); return newObject; }
public Document getDocument() throws SAXException, ResourceNotFoundException { if (document == null) { try { document = SourceUtil.toDOM(manager, source); } catch (ResourceNotFoundException e) { throw e; } catch (Exception e) { throw new SAXException("Error during XPointer evaluation while trying to load " + source.getURI(), e); } } return document; }
public void release(Source source) { if (source != null) { if (getLogger().isDebugEnabled()) { getLogger().debug("Releasing source " + source.getURI()); } } }
protected Script compileScript(Context cx, Scriptable scope, Source src) throws Exception { PushbackInputStream is = new PushbackInputStream(src.getInputStream(), ENCODING_BUF_SIZE); try { String encoding = findEncoding(is); Reader reader = encoding == null ? new InputStreamReader(is) : new InputStreamReader(is, encoding); reader = new BufferedReader(reader); return cx.compileReader(reader, src.getURI(), 1, null); } finally { is.close(); } }
/** * Generate XML data. */ public void generate() throws IOException, SAXException, ProcessingException { try { SourceUtil.parse(this.parser, this.inputSource, super.xmlConsumer); } catch (SAXException e) { SourceUtil.handleSAXException(this.inputSource.getURI(), e); } } }
/** * Generate XML data. */ public void generate() throws IOException, SAXException, ProcessingException { try { SourceUtil.parse(this.parser, this.inputSource, this.consumer); } catch (SAXException e) { SourceUtil.handleSAXException(this.inputSource.getURI(), e); } } }
/** * Release a {@link Source} object. */ public void release( Source source ) { if( null != source && getLogger().isDebugEnabled() ) { final String message = "Releasing source object for " + source.getURI(); getLogger().debug( message ); } // do nothing here }