congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IOUtils
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • BoxLayout (javax.swing)
  • JComboBox (javax.swing)
  • JTable (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now