Examples of asByteSource()


Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

      final FileBackedOutputStream out = new FileBackedOutputStream(limit);
      try {
         long bytesRead = ByteStreams.copy(instream, out);
         if (bytesRead >= limit)
            logger.debug("over limit %d/%d: wrote temp file", bytesRead, limit);
         InputStream is = out.asByteSource().openStream();
         try {
            wire(header, is);
         } finally {
            is.close();
         }
View Full Code Here

Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

            wire(header, is);
         } finally {
            is.close();
         }
         // we must call FileBackedOutputStream.reset to remove temporary file
         return new FilterInputStream(out.asByteSource().getInput()) {
            @Override
            public void close() throws IOException {
               super.close();
               out.reset();
            }
View Full Code Here

Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

      final FileBackedOutputStream out = new FileBackedOutputStream(limit);
      try {
         long bytesRead = ByteStreams.copy(instream, out);
         if (bytesRead >= limit)
            logger.debug("over limit %d/%d: wrote temp file", bytesRead, limit);
         wire(header, out.asByteSource().getInput());
         // we must call FileBackedOutputStream.reset to remove temporary file
         return new FilterInputStream(out.asByteSource().getInput()) {
            @Override
            public void close() throws IOException {
               super.close();
View Full Code Here

Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

         long bytesRead = ByteStreams.copy(instream, out);
         if (bytesRead >= limit)
            logger.debug("over limit %d/%d: wrote temp file", bytesRead, limit);
         wire(header, out.asByteSource().getInput());
         // we must call FileBackedOutputStream.reset to remove temporary file
         return new FilterInputStream(out.asByteSource().getInput()) {
            @Override
            public void close() throws IOException {
               super.close();
               out.reset();
            }
View Full Code Here

Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

      final FileBackedOutputStream out = new FileBackedOutputStream(limit);
      try {
         long bytesRead = ByteStreams.copy(instream, out);
         if (bytesRead >= limit)
            logger.debug("over limit %d/%d: wrote temp file", bytesRead, limit);
         InputStream is = out.asByteSource().openStream();
         try {
            wire(header, is);
         } finally {
            is.close();
         }
View Full Code Here

Examples of com.google.common.io.FileBackedOutputStream.asByteSource()

            wire(header, is);
         } finally {
            is.close();
         }
         // we must call FileBackedOutputStream.reset to remove temporary file
         return new FilterInputStream(out.asByteSource().openStream()) {
            @Override
            public void close() throws IOException {
               super.close();
               out.reset();
            }
View Full Code Here

Examples of io.fathom.cloud.storage.api.os.models.CloudObject.asByteSource()

        }

        CloudObject object = new CloudObject(fsFile.getData());

        BlobStore blobStore = getBlobStore(project);
        return object.asByteSource(blobStore, from, to);
    }

    @Override
    public void ensureBucket(Project project, String bucketName) throws CloudException {
        BucketData bucket = fileStore.getBuckets(project.getId()).find(bucketName);
View Full Code Here

Examples of ratpack.util.internal.TypeCoercingProperties.asByteSource()

   */
  public LaunchConfig build() throws ConfigurationException {
    TypeCoercingProperties props = LaunchConfigsInternal.consolidatePropertiesFromGlobalProperties(workingDir, classLoader, overrideProperties, defaultProperties);
    if (configurationSource == null) {
      if (byteSource == null) {
        byteSource = props.asByteSource(LaunchConfigs.Property.CONFIGURATION_FILE);
      }
      configurationSource = new DefaultConfigurationSource(classLoader, byteSource, overrideProperties, defaultProperties);
    }
    ConfigurationFactoryFactory configurationFactoryFactory = new DefaultConfigurationFactoryFactory(classLoader);
    ConfigurationFactory configurationFactory = configurationFactoryFactory.build(configurationSource);
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.