Tabnine Logo
IOUtils.getPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getPath
method
in
org.jfree.io.IOUtils

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

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

/**
 * 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

/**
 * 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/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

/**
 * 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

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
origin: org.jfree/com.springsource.org.jfree

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
origin: org.jfree/jcommon

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
org.jfree.ioIOUtilsgetPath

Javadoc

Implements the JDK 1.3 method URL.getPath(). The path is defined as URL.getFile() minus the (optional) query.

Popular methods of IOUtils

  • <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 "/".
  • 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.
  • getFileExtension
    Returns the file extension of the given file name. The returned value will contain the dot.
  • createRelativeURL,
  • getFileExtension,
  • getInstance,
  • stripFileExtension

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • Top 17 PhpStorm Plugins
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