Tabnine Logo
ArtifactContent.getSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getSize
method
in
org.artificer.common.ArtifactContent

Best Java code snippets using org.artificer.common.ArtifactContent.getSize (Showing top 1 results out of 315)

origin: org.artificer/artificer-repository-hibernate

  private void processDocument(ArtificerDocumentArtifact artificerArtifact, ArtifactContent content) throws Exception {
    InputStream inputStream = null;
    try {
      if (content != null) {
        artificerArtifact.setContentSize(content.getSize());
        inputStream = content.getInputStream();
        String sha1Hash = DigestUtils.shaHex(inputStream);
        artificerArtifact.setContentHash(sha1Hash);
      } else {
        artificerArtifact.setContentSize(0);
        artificerArtifact.setContentHash("");
      }
    } finally {
      if (inputStream != null) {
        IOUtils.closeQuietly(inputStream);
      }
    }
  }
}
org.artificer.commonArtifactContentgetSize

Popular methods of ArtifactContent

  • getFilename
    Obtain the artifact's filename.
  • getInputStream
    Obtain this artifact's InputStream, created on-demand.
  • getFile
    Obtain a reference to the artifact's temporary File on the filesystem.

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTable (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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