Package org.jets3t.service.model

Examples of org.jets3t.service.model.StorageObject.closeDataInputStream()


        // and downgrade missing files
        return null;
      }
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
View Full Code Here


      }
      handleServiceException(e);
      return null; //never returned - keep compiler happy
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
View Full Code Here

            // Re-retrieve object to ensure it was correctly created.
            basicObject = service.getObject(bucketName, object.getKey());
            assertEquals("Unexpected content type",
                Mimetypes.MIMETYPE_OCTET_STREAM, basicObject.getContentType());
            assertEquals("Unexpected size for 'empty' object", 0, basicObject.getContentLength());
            basicObject.closeDataInputStream();

            // Make sure bucket cannot be removed while it has contents.
            try {
                service.deleteBucket(bucketName);
                fail("Should not be able to delete a bucket containing objects");
View Full Code Here

            StringBuffer sb = new StringBuffer();
            int b = -1;
            while ((b = dataObject.getDataInputStream().read()) != -1) {
                sb.append((char) b);
            }
            dataObject.closeDataInputStream();
            assertEquals("Mismatching data", objectData, sb.toString());

            // Retrieve only HEAD of data object (all metadata is available, but not the object content
            // data input stream)
            dataObject = service.getObjectDetails(bucketName, object.getKey());
View Full Code Here

      }
      handleServiceException(e);
      return null; //never returned - keep compiler happy
    } finally {
      if (object != null) {
        object.closeDataInputStream();
      }
    }
  }

  /**
 
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.