### *** 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 Type
  Method
  Description
  `InputStream`
  `getInputStream()`
  Gets the input stream for this binary file entry.
  `InputStream`
  `getInputStream(Object streamID)`
  Deprecated.
  Use `getInputStream()` which now supports remote input streams.
  `String`
  `getMIMEType()`
  Returns the MIME type associated with this binary file entry.
  `String`
  `getName()`
  Returns the name of the file.
  `com.sas.io.RemoteInputStreamInterface`
  `getRemoteInputStream(Object streamID)`
  Deprecated.
  Use `getInputStream()` which now supports remote input streams.
  `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(String mimeType)`
  Sets the MIME type for this binary file entry.

  ### Methods inherited from interface com.sas.entities.EntityKeyInterface

  `getEntityKey, sameEntity, setEntityKey`

  ### Methods inherited from interface com.sas.services.publish.EntryInterface

  `getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs`

- ## Method Details

  - ### getMIMEType

    String getMIMEType() throws RemoteException, TransportException, IllegalStateException
    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:
      `String` The MIME type associated with this binary file entry; can be null.
    Throws:
      `TransportException` - If the transport encounters an error getting the MIME type.
      `RemoteException` - If a network anomaly is encountered
      `IllegalStateException` - 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

    String getName() throws RemoteException, TransportException, IllegalStateException
    Returns the name of the file.
    Returns:
      `String` The 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.
    Use `getInputStream()` 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 utilize `getRemoteInputStream(java.lang.Object)` in order to obtain the input stream.
    Specified by:
      `getInputStream` in interface `com.sas.io.InputStreamProviderInterface`
    Parameters:
      `streamID` - The stream description should be `null`; 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.
    Use `getInputStream()` 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:
      `getRemoteInputStream` in interface `com.sas.io.InputStreamProviderInterface`
    Parameters:
      `streamID` - The stream description should be `null`; it will be ignored.
    Returns:
      `RemoteInputStream` The 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, RemoteException
    Deprecated.
    this method no longer needed as getInputStream() will return an input stream that can be used in a remote environment
    Check if `getInputStream(java.lang.Object)` will succeed. See `getInputStream(java.lang.Object)` to determine whether this method should be used.
    Specified by:
      `hasInputStream` in interface `com.sas.io.InputStreamProviderInterface`
    Returns:
      `Object` non-null if getInputStream(java.lang.Object) would succeed; throws UnmarshalException if it would fail
    Throws:
      `UnmarshalException` - if invoked on a remote obejct
      `RemoteException` - if a network anomaly is encountered.

  - ### getInputStream

    InputStream getInputStream() throws IOException, RemoteException, IllegalStateException
    Gets 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.