|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.publish.BinaryFileEntry
@SASScope(value="ALL") @BinaryCompatibilityOnly public class BinaryFileEntry
Represents a binary file entry that can then be added to a result package for publishing. See Constructing a Result Package to Publish for an example of how this class is used.
| Field Summary |
|---|
| Fields inherited from class com.sas.services.publish.AbstractEntry |
|---|
BINARY_COMPAT_VERSION, CATALOG_COMPAT_VERSION, DATASET_COMPAT_VERSION, DEFAULT_ENTRY_VERSION, HTML_COMPAT_VERSION, MDDB_COMPAT_VERSION, NESTEDPACKAGE_COMPAT_VERSION, REFERENCE_COMPAT_VERSION, SQLVIEW_COMPAT_VERSION, TEXT_COMPAT_VERSION, VERSION_94_EXTENDED_ATTRIBUTES, VIEWER_COMPAT_VERSION |
| Constructor Summary | |
|---|---|
BinaryFileEntry(java.io.File file)
Creates a binary file entry. |
|
BinaryFileEntry(java.io.InputStream inputStream,
java.lang.String name)
Creates a binary file entry. |
|
| Method Summary | |
|---|---|
protected void |
closeEntry()
Remove any temporary files needed for inputstream re-use and mark this entry as closed. |
void |
consumeStream()
Consume and close the input stream provided on the constructor. |
protected void |
finalize()
At finalize time, cleanup temporary files if necessary. |
java.io.InputStream |
getInputStream()
Gets the input stream for this binary file entry. |
java.io.InputStream |
getInputStream(java.lang.Object streamID)
Deprecated. Use getInputStream()which now supports remote
input streams. |
java.lang.String |
getMIMEType()
Returns the MIME type associated with this binary file entry. |
java.lang.String |
getName()
Returns the name of the file. |
com.sas.io.RemoteInputStreamInterface |
getRemoteInputStream(java.lang.Object streamID)
Deprecated. Use getInputStream()which now supports remote
input streams. |
java.lang.Object |
hasInputStream()
Deprecated. this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment |
void |
setMIMEType(java.lang.String mimeType)
Sets the MIME associated with this file entry. |
| Methods inherited from class com.sas.services.publish.AbstractEntry |
|---|
getDescription, getEntityKey, getNameValuePairs, getURL, isClosed, isReadOnly, sameEntity, setClosed, setDescription, setEntityKey, setNameValuePairs, setRead, throwExceptionIfClosed |
| Methods inherited from interface com.sas.services.publish.EntryInterface |
|---|
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs |
| Methods inherited from interface com.sas.entities.EntityKeyInterface |
|---|
getEntityKey, sameEntity, setEntityKey |
| Constructor Detail |
|---|
public BinaryFileEntry(java.io.File file)
throws java.lang.IllegalArgumentException,
java.rmi.RemoteException
There is no default MIME type. To set the MIME type for the entry, use
setMIMEType(java.lang.String).
file - The binary file.
java.lang.IllegalArgumentException - If a null file is
specified.
java.rmi.RemoteException - If a network anomaly is encountered.
public BinaryFileEntry(java.io.InputStream inputStream,
java.lang.String name)
throws java.lang.IllegalArgumentException,
java.rmi.RemoteException
There is no default MIME type. To set the MIME type for the entry, use
setMIMEType(java.lang.String).
inputStream - The input stream of the binary file.name - The name of the binary file entry. This name will be used as
the name of the entry when publishing the package.
java.lang.IllegalArgumentException - If a null input stream or
a null name is specified.
java.rmi.RemoteException - If a network anomaly is encountered.| Method Detail |
|---|
public java.lang.String getName()
throws java.rmi.RemoteException,
TransportException,
java.lang.IllegalStateException
getName in interface BinaryFileEntryInterfaceString The name of the file.
java.lang.IllegalStateException - If the package containing this entry is
already closed.
TransportException - If the transport encounters an error getting
the name.
java.rmi.RemoteException - If a network anomaly is encountered.
public java.lang.String getMIMEType()
throws java.rmi.RemoteException,
TransportException,
java.lang.IllegalStateException
getMIMEType in interface BinaryFileEntryInterfaceString The MIME type associated with this binary
file entry; can be java.lang.IllegalStateException - If the package containing this entry is
already closed.
TransportException - If the transport encounters an error getting
the MIME type.
java.rmi.RemoteException - If a network anomaly is encountered
public void setMIMEType(java.lang.String mimeType)
throws java.lang.IllegalStateException,
java.rmi.RemoteException
setMIMEType in interface BinaryFileEntryInterfacemimeType - The MIME type associated with this file entry.
java.lang.IllegalStateException - If the entry is read only or if the package
containing this entry has already been closed.
java.rmi.RemoteException - If a network anomaly is encountered.
public java.io.InputStream getInputStream()
throws java.io.IOException,
java.rmi.RemoteException,
java.lang.IllegalStateException
getInputStream in interface BinaryFileEntryInterfacejava.lang.IllegalStateException - If the package containing this entry is
already closed.
java.io.IOException - If an error occurs constructing the input stream.
java.rmi.RemoteException - If a network anomaly is encountered.
public java.io.InputStream getInputStream(java.lang.Object streamID)
throws java.io.IOException,
java.rmi.RemoteException,
java.rmi.UnmarshalException,
java.lang.IllegalStateException
getInputStream()which now supports remote
input streams.
getRemoteInputStream(java.lang.Object)in order to obtain the input stream.
getInputStream in interface com.sas.io.InputStreamProviderInterfacegetInputStream in interface BinaryFileEntryInterfacestreamID - The stream description should be null; it
will be ignored.
java.lang.IllegalStateException - If the package containing this entry is
already closed.
java.rmi.UnmarshalException - If invoked on a remote object.
java.io.IOException - If an error occurs constructing the input stream.
java.rmi.RemoteException - If a network anomaly is encountered.
public com.sas.io.RemoteInputStreamInterface getRemoteInputStream(java.lang.Object streamID)
throws com.sas.io.ChainedIOException,
java.rmi.RemoteException,
java.lang.IllegalStateException
getInputStream()which now supports remote
input streams.
getRemoteInputStream in interface com.sas.io.InputStreamProviderInterfacegetRemoteInputStream in interface BinaryFileEntryInterfacestreamID - The stream description should be null ;it
will be ignored.
RemoteInputStream The file as a remote input
stream.
java.lang.IllegalStateException - If the package containing this entry is
already closed.
com.sas.io.ChainedIOException - If an I/O error occurs obtaining the input
stream.
java.rmi.RemoteException - If a network anomaly is encountered.
public java.lang.Object hasInputStream()
throws java.rmi.UnmarshalException,
java.rmi.RemoteException,
java.lang.IllegalStateException
getInputStream(java.lang.Object)will succeed. See
getInputStream(java.lang.Object)to determine whether this method
should be used.
hasInputStream in interface com.sas.io.InputStreamProviderInterfacehasInputStream in interface BinaryFileEntryInterfacejava.rmi.UnmarshalException - if invoked on a remote object
java.lang.IllegalStateException - If the package containing this entry is
already closed.
java.rmi.RemoteException - if a network I/O error occurs.
public void consumeStream()
throws java.io.IOException,
java.rmi.RemoteException,
java.lang.IllegalStateException
java.lang.IllegalStateException - If the package containing this entry is
already closed.
java.io.IOException - If an error occurs constructing the input stream.
java.rmi.RemoteException - If a network anomaly is encountered.protected void closeEntry()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||