SCMFile.getMimeType
Code IndexAdd Codota to your IDE (free)

Best code snippets using jenkins.scm.api.SCMFile.getMimeType(Showing top 2 results out of 315)

origin: org.jenkins-ci.plugins/scm-api

/**
 * Returns the MIME type of this file.
 * <p>The default implementation infers this based on the file name, but
 * sophisticated server might provide this information from different sources,
 * such as "svn:mime-type" in Subversion.</p>
 *
 * @return the MIME type of this file.
 * @throws FileNotFoundException if this {@link SCMFile} instance does not exist in the remote system (e.g. if you
 *                               created a nonexistent instance via {@link #child(String)})
 * @throws IOException           if an error occurs while performing the operation.
 * @throws InterruptedException  if interrupted while performing the operation.
 */
@NonNull
public String contentMimeType() throws IOException, InterruptedException {
  return getMimeType(getName());
}
origin: org.jenkins-ci.plugins/scm-api

/**
 * Returns the MIME type of this file.
 * <p>The default implementation infers this based on the file name, but
 * sophisticated server might provide this information from different sources,
 * such as "svn:mime-type" in Subversion.</p>
 *
 * @return the MIME type of this file.
 * @throws FileNotFoundException if this {@link SCMFile} instance does not exist in the remote system (e.g. if you
 *                               created a nonexistent instance via {@link #child(String)})
 * @throws IOException           if an error occurs while performing the operation.
 * @throws InterruptedException  if interrupted while performing the operation.
 */
@NonNull
public String contentMimeType() throws IOException, InterruptedException {
  return getMimeType(getName());
}
jenkins.scm.apiSCMFilegetMimeType

Javadoc

Looks up the servlet container's mime type mapping for the provided filename.

Popular methods of SCMFile

  • contentAsString
    A convenience method that reads the content and then turns it into a string.
  • getType
    The type of this object.
  • child
    Constructs a child/descendant SCMFile instance path relative from this object.
  • getName
    Gets the file name of this file without any path portion, such as just "foo.txt" This method is the
  • isRoot
    Tests if this instance is the root of the filesystem.
  • children
    If this object represents a directory, lists up all the immediate children.This method is the equiva
  • content
    Reads the content of this file.
  • contentEncoding
    Encoding of this file.This is used to interpret text files. Some SCM implementations allow users to
  • contentMimeType
    Returns the MIME type of this file.The default implementation infers this based on the file name, bu
  • isContentText
    The opposite of #isContentBinary()
  • lastModified
    Returns the time that the SCMFile was last modified.
  • newChild
    Constructs an immediate child with the supplied type hint.
  • lastModified,
  • newChild,
  • parent,
  • type

Popular classes and methods

  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TreeMap (java.util)
    A map whose entries are sorted by their keys. All optional operations such as #put and #remove are s
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)