List of usage examples for org.apache.commons.vfs FileTypeHasNoContentException FileTypeHasNoContentException
public FileTypeHasNoContentException(final Object info0)
From source file:org.jclouds.vfs.provider.blobstore.BlobStoreFileObject.java
@Override protected InputStream doGetInputStream() throws Exception { if (!getType().hasContent()) { throw new FileSystemException("vfs.provider/read-not-file.error", getName()); }//from ww w. j a v a 2s.c om if (metadata != null && metadata.getType() != StorageType.BLOB) { throw new FileTypeHasNoContentException(getName()); } logger.info(String.format(">> get: %s/%s", getContainer(), getNameTrimLeadingSlashes())); Blob blob = getBlobStore().getBlob(getContainer(), getNameTrimLeadingSlashes()); return blob.getPayload().getInput(); }