Codota Logo
IOUtils
Code IndexAdd Codota to your IDE (free)

How to use
IOUtils
in
org.jfree.io

Best Java code snippets using org.jfree.io.IOUtils (Showing top 17 results out of 315)

  • Common ways to obtain IOUtils
private void myMethod () {
IOUtils i =
  • Codota Iconnew IOUtils()
  • Smart code suggestions by Codota
}
origin: jfree/jcommon

/**
 * Gets the singleton instance of the utility package.
 *
 * @return the singleton instance.
 */
public static IOUtils getInstance() {
  if (instance == null) {
    instance = new IOUtils();
  }
  return instance;
}
origin: jfree/jcommon

/**
 * Copies the InputStream into the OutputStream, until the end of the stream
 * has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the inputstream from which to read.
 * @param out the outputstream where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyStreams(final InputStream in, final OutputStream out)
  throws IOException {
  copyStreams(in, out, 4096);
}
origin: org.jfree/jcommon

/**
 * Copies the contents of the Reader into the Writer, until the end of the 
 * stream has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the reader from which to read.
 * @param out the writer where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyWriter(final Reader in, final Writer out)
  throws IOException {
  copyWriter(in, out, 4096);
}
origin: org.jfree/com.springsource.org.jfree

  throw new NullPointerException("baseURL must not be null.");
if (isFileStyleProtocol(url) && isSameService(url, baseURL)) {
  final List urlName = parseName(getPath(url));
  final List baseName = parseName(getPath(baseURL));
  final String query = getQuery(url);
  if (!isPath(baseURL)) {
    baseName.remove(baseName.size() - 1);
  int commonIndex = startsWithUntil(urlName, baseName);
  if (commonIndex == 0) {
    return url.toExternalForm();
  return formatName(retval, query);
origin: jfree/jcommon

/**
 * Extracts the file name from the URL.
 *
 * @param url the url.
 * @return the extracted filename.
 */
public String getFileName(final URL url) {
  final String file = getPath(url);
  final int last = file.lastIndexOf("/");
  if (last < 0) {
    return file;
  }
  return file.substring(last + 1);
}
origin: org.jfree/jcommon

  throw new NullPointerException("baseURL must not be null.");
if (isFileStyleProtocol(url) && isSameService(url, baseURL)) {
  final List urlName = parseName(getPath(url));
  final List baseName = parseName(getPath(baseURL));
  final String query = getQuery(url);
  if (!isPath(baseURL)) {
    baseName.remove(baseName.size() - 1);
  int commonIndex = startsWithUntil(urlName, baseName);
  if (commonIndex == 0) {
    return url.toExternalForm();
  return formatName(retval, query);
origin: org.jfree/jcommon

/**
 * Extracts the file name from the URL.
 *
 * @param url the url.
 * @return the extracted filename.
 */
public String getFileName(final URL url) {
  final String file = getPath(url);
  final int last = file.lastIndexOf("/");
  if (last < 0) {
    return file;
  }
  return file.substring(last + 1);
}
origin: jfree/jcommon

  throw new NullPointerException("baseURL must not be null.");
if (isFileStyleProtocol(url) && isSameService(url, baseURL)) {
  final List urlName = parseName(getPath(url));
  final List baseName = parseName(getPath(baseURL));
  final String query = getQuery(url);
  if (!isPath(baseURL)) {
    baseName.remove(baseName.size() - 1);
  int commonIndex = startsWithUntil(urlName, baseName);
  if (commonIndex == 0) {
    return url.toExternalForm();
  return formatName(retval, query);
origin: jfree/jcommon

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
origin: jfree/jcommon

/**
 * Copies the contents of the Reader into the Writer, until the end of the 
 * stream has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the reader from which to read.
 * @param out the writer where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyWriter(final Reader in, final Writer out)
  throws IOException {
  copyWriter(in, out, 4096);
}
origin: org.jfree/jcommon

/**
 * Gets the singleton instance of the utility package.
 *
 * @return the singleton instance.
 */
public static IOUtils getInstance() {
  if (instance == null) {
    instance = new IOUtils();
  }
  return instance;
}
origin: org.jfree/jcommon

/**
 * Copies the InputStream into the OutputStream, until the end of the stream
 * has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the inputstream from which to read.
 * @param out the outputstream where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyStreams(final InputStream in, final OutputStream out)
  throws IOException {
  copyStreams(in, out, 4096);
}
origin: org.jfree/jcommon

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Copies the contents of the Reader into the Writer, until the end of the 
 * stream has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the reader from which to read.
 * @param out the writer where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyWriter(final Reader in, final Writer out)
  throws IOException {
  copyWriter(in, out, 4096);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Gets the singleton instance of the utility package.
 *
 * @return the singleton instance.
 */
public static IOUtils getInstance() {
  if (instance == null) {
    instance = new IOUtils();
  }
  return instance;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Copies the InputStream into the OutputStream, until the end of the stream
 * has been reached. This method uses a buffer of 4096 kbyte.
 *
 * @param in the inputstream from which to read.
 * @param out the outputstream where the data is written to.
 * @throws IOException if a IOError occurs.
 */
public void copyStreams(final InputStream in, final OutputStream out)
  throws IOException {
  copyStreams(in, out, 4096);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
org.jfree.ioIOUtils

Javadoc

The IOUtils provide some IO related helper methods.

Most used methods

  • <init>
    DefaultConstructor.
  • copyStreams
    Copies the InputStream into the OutputStream, until the end of the stream has been reached.
  • copyWriter
    Copies the contents of the Reader into the Writer, until the end of the stream has been reached.
  • formatName
    Transforms the name list back into a single string, separated with "/".
  • getPath
    Implements the JDK 1.3 method URL.getPath(). The path is defined as URL.getFile() minus the (optiona
  • getQuery
    Implements the JDK 1.3 method URL.getPath(). The path is defined as URL.getFile() minus the (optiona
  • isFileStyleProtocol
    Checks, whether the URL uses a file based protocol.
  • isPath
    Returns true if the URL represents a path, andfalse otherwise.
  • isSameService
    Checks, whether the URL points to the same service. A service is equal if the protocol, host and por
  • parseName
    Parses the given name and returns the name elements as List of Strings.
  • startsWithUntil
    Compares both name lists, and returns the last common index shared between the two lists.
  • createRelativeURL
    Creates a relative url by stripping the common parts of the the url.
  • startsWithUntil,
  • createRelativeURL,
  • getFileExtension,
  • getInstance,
  • stripFileExtension

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JButton (javax.swing)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now