org.jfree.io.IOUtils Java Examples
The following examples show how to use
org.jfree.io.IOUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: URLObjectDescription.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Sets the parameters of this description object to match the supplied object. * * @param o the object (should be an instance of <code>URL</code>). * * @throws ObjectFactoryException if the object is not an instance of <code>URL</code>. */ public void setParameterFromObject(final Object o) throws ObjectFactoryException { if (!(o instanceof URL)) { throw new ObjectFactoryException("Is no instance of java.net.URL"); } final URL comp = (URL) o; final String baseURL = getConfig().getConfigProperty(Parser.CONTENTBASE_KEY); try { final URL bURL = new URL(baseURL); setParameter("value", IOUtils.getInstance().createRelativeURL(comp, bURL)); } catch (Exception e) { Log.warn("BaseURL is invalid: ", e); } setParameter("value", comp.toExternalForm()); }
Example #2
Source File: DefaultModelReader.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Starts include handling. * * @param resource the URL. */ protected void startIncludeHandling(final URL resource) { this.source = IOUtils.getInstance().createRelativeURL(resource, this.baseURL); this.model.addSource(this.source); this.model.addIncludeComment( this.source, new Comments(getOpenComment(), getCloseComment()) ); }
Example #3
Source File: DownloadUtils.java From uyuni with GNU General Public License v2.0 | 4 votes |
private static String toString(InputStream stream) throws IOException { StringWriter writer = new StringWriter(); IOUtils.getInstance().copyWriter( new BufferedReader(new InputStreamReader(stream)), writer); return writer.toString(); }
Example #4
Source File: DownloadUtils.java From spacewalk with GNU General Public License v2.0 | 4 votes |
private static String toString(InputStream stream) throws IOException { StringWriter writer = new StringWriter(); IOUtils.getInstance().copyWriter( new BufferedReader(new InputStreamReader(stream)), writer); return writer.toString(); }