Examples of StreamMetrics


Examples of org.sonatype.nexus.blobstore.file.FileOperations.StreamMetrics

    );

    when(metadataStore.add(any(BlobMetadata.class))).thenReturn(fakeId);
    when(locationStrategy.location(fakeId)).thenReturn("fakePath");
    final Path fakePath = root.resolve("fakePath" + FileBlobStore.BLOB_CONTENT_SUFFIX);
    when(fileOps.create(fakePath, inputStream)).thenReturn(new StreamMetrics(contentSize, fakeSHA1));

    final Blob blob = underTest.create(inputStream, headers);

    final BlobMetrics metrics = blob.getMetrics();
View Full Code Here

Examples of org.sonatype.nexus.blobstore.file.FileOperations.StreamMetrics

  public long getSize() {
    return countingInputStream.getCount();
  }

  public StreamMetrics getMetrics() {
    return new StreamMetrics(getSize(), getMessageDigest());
  }
View Full Code Here

Examples of org.sonatype.nexus.blobstore.file.FileOperations.StreamMetrics

      blobId = metadataStore.add(metadata);

      final Path path = pathFor(blobId);
      log.debug("Writing blob {} to {}", blobId, path);

      final StreamMetrics streamMetrics = fileOperations.create(path, blobData);
      final BlobMetrics metrics = new BlobMetrics(new DateTime(), streamMetrics.getSHA1(), streamMetrics.getSize());
      final FileBlob blob = new FileBlob(blobId, headers, path, metrics);

      if (listener != null) {
        listener.blobCreated(blob, "Blob: " + blobId + " written to: " + path);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.