All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This interface provides Binary Compatibility only, not Source Compatibility ***

## com.sas.services.publish
Interface BinaryFileEntryInterface

All Superinterfaces:
  com.sas.entities.EntityKeyInterface, EntryInterface, com.sas.io.InputStreamProviderInterface, java.rmi.Remote

All Known Implementing Classes:
  BinaryFileEntry

    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
`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 type for this binary file entry.

Methods inherited from interface com.sas.services.publish.EntryInterface
`getDescription, getNameValuePairs, getURL, isReadOnly, setDescription, setNameValuePairs`

Method Detail

### getMIMEType

    java.lang.String getMIMEType()
                                 throws java.rmi.RemoteException,
                                        TransportException,
                                        java.lang.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.
    `java.rmi.RemoteException` - If a network anomaly is encountered
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### setMIMEType

    void setMIMEType(java.lang.String mimeType)
                     throws java.lang.IllegalStateException,
                            java.rmi.RemoteException

  Sets the MIME type for this binary file entry.

  Parameters:
    `mimeType` - The MIME type to associate with this binary file entry.
  Throws:
    `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.

### getName

    java.lang.String getName()
                             throws java.rmi.RemoteException,
                                    TransportException,
                                    java.lang.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.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### getInputStream

    java.io.InputStream getInputStream(java.lang.Object streamID)
                                       throws java.rmi.UnmarshalException,
                                              java.io.IOException,
                                              java.rmi.RemoteException,
                                              java.lang.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:
    `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.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### getRemoteInputStream

    com.sas.io.RemoteInputStreamInterface getRemoteInputStream(java.lang.Object streamID)
                                                               throws java.io.IOException,
                                                                      java.rmi.RemoteException,
                                                                      java.lang.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:
    `java.io.IOException` - If an error occurs constructing the remote input stream.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### hasInputStream

    java.lang.Object hasInputStream()
                                    throws java.rmi.UnmarshalException,
                                           java.rmi.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:
    `java.rmi.UnmarshalException` - if invoked on a remote obejct
    `java.rmi.RemoteException` - if a network anomaly is encountered.

### getInputStream

    java.io.InputStream getInputStream()
                                       throws java.io.IOException,
                                              java.rmi.RemoteException,
                                              java.lang.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:
    `java.io.IOException` - If an error occurs constructing the input stream.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

*** This interface provides Binary Compatibility only, not Source Compatibility ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.