congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ArtifactContent.getInputStream
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.artificer/artificer-integration

  /**
   * Since the build process is multi-step and parses the content multiple times, it's necessary to be given
   * the byte[] and provide on-demand ByteArrayInputStreams as needed.
   * 
   * @return InputStream
   */
  protected InputStream getContentStream() throws FileNotFoundException {
    return artifactContent.getInputStream();
  }
}
origin: org.artificer/artificer-repository-hibernate

  @Override
  public void write(ArtificerDocumentArtifact artifact, ArtifactContent content, EntityManager entityManager) throws Exception {
    artifact.setContent(IOUtils.toByteArray(content.getInputStream()));
  }
}
origin: org.artificer/artificer-repository-hibernate

  @Override
  public void write(ArtificerDocumentArtifact artifact, ArtifactContent content, EntityManager entityManager) throws Exception {
    InputStream inputStream = null;
    try {
      File out = new File(path + artifact.getUuid());
      out.createNewFile();
      inputStream = content.getInputStream();
      Files.copy(content.getInputStream(), out.toPath(), StandardCopyOption.REPLACE_EXISTING);
      artifact.setContentPath(path + artifact.getUuid());
    } finally {
      if (inputStream != null) {
        IOUtils.closeQuietly(inputStream);
      }
    }
  }
}
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.commonArtifactContentgetInputStream

Javadoc

Obtain this artifact's InputStream, created on-demand.

Popular methods of ArtifactContent

  • getFilename
    Obtain the artifact's filename.
  • getFile
    Obtain a reference to the artifact's temporary File on the filesystem.
  • getSize

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JComboBox (javax.swing)
  • PhpStorm for WordPress
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