*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.publish
Interface BinaryFileEntryInterface
- All Superinterfaces:
com.sas.entities.EntityKeyInterface,EntryInterface,com.sas.io.InputStreamProviderInterface,Remote
- All Known Implementing Classes:
BinaryFileEntry
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface BinaryFileEntryInterface
extends EntryInterface, com.sas.io.InputStreamProviderInterface
The BinaryFileEntryInterface provides a mechanism
for setting and getting the attributes of a binary file entry.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionInputStreamGets the input stream for this binary file entry.InputStreamgetInputStream(Object streamID) Deprecated.StringReturns the MIME type associated with this binary file entry.StringgetName()Returns the name of the file.com.sas.io.RemoteInputStreamInterfacegetRemoteInputStream(Object streamID) Deprecated.UsegetInputStream()which now supports remote input streams.ObjectDeprecated.this method no longer needed as getInputStream() will return an input stream that can be used in a remote environmentvoidsetMIMEType(String mimeType) Sets the MIME type for this binary file entry.Methods inherited from interface com.sas.entities.EntityKeyInterface
getEntityKey, sameEntity, setEntityKeyMethods inherited from interface com.sas.services.publish.EntryInterface
getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs
-
Method Details
-
getMIMEType
Returns the MIME type associated with this binary file entry. The user-specified MIME type is assigned when the binary file entry is published.- Returns:
StringThe MIME type associated with this binary file entry; can benull. - Throws:
TransportException- If the transport encounters an error getting the MIME type.RemoteException- If a network anomaly is encounteredIllegalStateException- If the package containing this entry is already closed.
-
setMIMEType
void setMIMEType(String mimeType) throws IllegalStateException, RemoteException Sets the MIME type for this binary file entry.- Parameters:
mimeType- The MIME type to associate with this binary file entry.- Throws:
IllegalStateException- If the entry is read only or if the package containing this entry has already been closed.RemoteException- If a network anomaly is encountered.
-
getName
Returns the name of the file.- Returns:
StringThe name of the file.- Throws:
TransportException- If the transport encounters an error getting the name.RemoteException- If a network anomaly is encountered.IllegalStateException- If the package containing this entry is already closed.
-
getInputStream
InputStream getInputStream(Object streamID) throws UnmarshalException, IOException, RemoteException, IllegalStateException Deprecated.UsegetInputStream()which now supports remote input streams.Gets the input stream for this binary file entry. Because input streams are not remotable, this method will throw a RemoteException if it is invoked on a remote object. Distributed applications should utilizegetRemoteInputStream(java.lang.Object)in order to obtain the input stream.- Specified by:
getInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Parameters:
streamID- The stream description should benull; it will be ignored.- Returns:
- The input stream that can be used for reading the contents of the binary file entry.
- Throws:
UnmarshalException- If invoked on a remote object.IOException- If an error occurs constructing the input stream.RemoteException- If a network anomaly is encountered.IllegalStateException- If the package containing this entry is already closed.
-
getRemoteInputStream
com.sas.io.RemoteInputStreamInterface getRemoteInputStream(Object streamID) throws IOException, RemoteException, IllegalStateException Deprecated.UsegetInputStream()which now supports remote input streams.Get the remote input stream for the binary file entry. Because input streams are not remotable, distributed applications should use remote input streams.- Specified by:
getRemoteInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Parameters:
streamID- The stream description should benull; it will be ignored.- Returns:
RemoteInputStreamThe remote input stream that can be used for reading the contents of the binary file entry.- Throws:
IOException- If an error occurs constructing the remote input stream.RemoteException- If a network anomaly is encountered.IllegalStateException- If the package containing this entry is already closed.
-
hasInputStream
Object hasInputStream() throws UnmarshalException, RemoteExceptionDeprecated.this method no longer needed as getInputStream() will return an input stream that can be used in a remote environmentCheck ifgetInputStream(java.lang.Object)will succeed. SeegetInputStream(java.lang.Object)to determine whether this method should be used.- Specified by:
hasInputStreamin interfacecom.sas.io.InputStreamProviderInterface- Returns:
Objectnon-null if getInputStream(java.lang.Object) would succeed; throws UnmarshalException if it would fail- Throws:
UnmarshalException- if invoked on a remote obejctRemoteException- if a network anomaly is encountered.
-
getInputStream
InputStream getInputStream() throws IOException, RemoteException, IllegalStateExceptionGets the input stream for this binary file entry.- Returns:
- The input stream that can be used for reading the contents of the binary file entry.
- Throws:
IOException- If an error occurs constructing the input stream.RemoteException- If a network anomaly is encountered.IllegalStateException- If the package containing this entry is already closed.
-
getInputStream()which now supports remote input streams.