public static class SObject.FileSObject extends SObject
SObject.ByteArraySObject, SObject.FileSObject, SObject.InputStreamSObject, SObject.LazyLoadSObject, SObject.StringSObjectaccessDenied, cause, existsATTR_CONTENT_LENGTH, ATTR_CONTENT_TYPE, ATTR_FILE_NAME, ATTR_SS_CTX, ATTR_SS_ID, ATTR_URL, VERSION| Modifier and Type | Method and Description |
|---|---|
byte[] |
asByteArray() |
File |
asFile() |
InputStream |
asInputStream()
Returns an
InputStream connect to the sobject. |
String |
asString() |
String |
asString(Charset charset) |
String |
getContentType()
Return
content type attribute |
String |
getFilename()
Returns
filename attribute |
long |
getLength() |
protected boolean |
probeBinary() |
accessDeniedObject, consumeOnce, getAttribute, getAttributes, getException, getInvalidObject, getKey, getUrl, hasAttribute, invalidObject, isAccessDenied, isBinary, isDumb, isEmpty, isExists, isValid, lazyLoad, lazyLoad, lazyLoad, loadResource, notFoundObject, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, setAttribute, setAttributes, setAttrs, setCause, setContentType, setFilename, suffix, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOfpublic long getLength()
public File asFile() throws UnexpectedIOException
UnexpectedIOExceptionpublic String asString() throws UnexpectedIOException
UnexpectedIOExceptionpublic String asString(Charset charset) throws UnexpectedIOException
UnexpectedIOExceptionpublic byte[] asByteArray()
throws UnexpectedIOException
UnexpectedIOExceptionpublic InputStream asInputStream() throws UnexpectedIOException
ISObjectReturns an InputStream connect to the sobject. Note it is caller’s responsibility to close the inputStream
UnexpectedIOExceptionpublic String getFilename()
ISObjectReturns filename attribute
getFilename in interface ISObjectgetFilename in class SObjectpublic String getContentType()
ISObjectReturn content type attribute
getContentType in interface ISObjectgetContentType in class SObjectprotected boolean probeBinary()
probeBinary in class SObjectCopyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.