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 TextFileEntryInterface

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

All Known Implementing Classes:
  TextFileEntry

    @SASScope(value="ALL")
    @BinaryCompatibilityOnly
    public interface TextFileEntryInterface

extends EntryInterface, com.sas.io.ReaderProviderInterface

The TextFileEntryInterface provides a mechanism for setting and getting the attributes of a text file entry.

Since:
  1.0

Method Summary
`abstract java.lang.String` | `getMIMEType()` Returns the MIME type associated with this text file entry.
`abstract java.lang.String` | `getName()` Returns the name of the file.
`abstract java.io.Reader` | `getReader()` Gets reader for the text file entry.
`abstract java.io.Reader` | `getReader(int maxLineLength)` Gets reader for the text file entry.
`abstract java.io.Reader` | `getReader(java.lang.Object readerID)` Deprecated. Use `getReader()` which now supports remote readers.
`abstract com.sas.io.RemoteReaderInterface` | `getRemoteReader(java.lang.Object readerID)` Deprecated. Use `getReader()` which now supports remote readers.
`abstract java.lang.Object` | `hasReader()` Deprecated. this method no longer needed as getReader() will return a reader that can be used in a remote environment
`abstract void` | `setEncoding(java.lang.String encoding)` Sets the encoding of the text file.
`abstract void` | `setMIMEType(java.lang.String mimeType)` Sets the MIME type for this text file entry.

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`

Method Detail

### getMIMEType

    java.lang.String getMIMEType()
                                 throws TransportException,
                                        java.rmi.RemoteException,
                                        java.lang.IllegalStateException

  Returns the MIME type associated with this text file entry. The user-specified MIME type is assigned when the text file entry is published.

  Returns:
    `String` The MIME type associated with this text 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 text file entry.

  Parameters:
    `mimeType` - The MIME type to associate with this text 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 of the file.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### setEncoding

    void setEncoding(java.lang.String encoding)
                     throws java.rmi.RemoteException,
                            java.lang.IllegalStateException

  Sets the encoding of the text file. This method can only be specified when constructing a package to be published. If specified, the encoding is used when constructing the Reader that is returned by getReader and and getRemoteReader, and it is used to publish the file.

  Parameters:
    `encoding` - The encoding for this text file.
  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

### getReader

    java.io.Reader getReader(java.lang.Object readerID)
                             throws java.rmi.UnmarshalException,
                                    java.io.IOException,
                                    java.rmi.RemoteException,
                                    java.lang.IllegalStateException

  Deprecated. Use `getReader()` which now supports remote readers.

  Gets reader for the text file entry. Because readers are not remotable, this method will throw a RemoteException if it is invoked on a remote object. Distributed applications should utilize `getRemoteReader(java.lang.Object)` in order to obtain the reader.

  Specified by:
    `getReader` in interface `com.sas.io.ReaderProviderInterface`
  Parameters:
    `readerID` - The reader description should be `null`; it will be ignored.
  Returns:
    The reader that can be used for reading the contents of the text 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.

### getRemoteReader

    com.sas.io.RemoteReaderInterface getRemoteReader(java.lang.Object readerID)
                                                     throws java.io.IOException,
                                                            java.rmi.RemoteException,
                                                            java.lang.IllegalStateException

  Deprecated. Use `getReader()` which now supports remote readers.

  Get the remote reader for the text file entry. Because readers are not remotable, distributed applications should use remote readers.

  Specified by:
    `getRemoteReader` in interface `com.sas.io.ReaderProviderInterface`
  Parameters:
    `readerID` - The reader description should be `null`; it will be ignored.
  Returns:
    `RemoteReader` The remote reader that can be used for reading the contents of the text file entry.
  Throws:
    `java.io.IOException` - If an error occurs constructing the remote reader.
    `java.rmi.RemoteException` - If a network anomaly is encountered.
    `java.lang.IllegalStateException` - If the package containing this entry is already closed.

### hasReader

    java.lang.Object hasReader()
                               throws java.rmi.UnmarshalException,
                                      java.rmi.RemoteException

  Deprecated. this method no longer needed as getReader() will return a reader that can be used in a remote environment

  Check if getReader(java.lang.Object) will succeeed.

  Specified by:
    `hasReader` in interface `com.sas.io.ReaderProviderInterface`
  Returns:
    non-null if getReader(java.lang.Object) would succeed; throws UnmarshalException if it would fail
  Throws:
    `java.rmi.UnmarshalException` - if invoked on a remote object
    `java.rmi.RemoteException` - if a network I/O error occurs.

### getReader

    java.io.Reader getReader()
                             throws java.io.IOException,
                                    java.rmi.RemoteException,
                                    java.lang.IllegalStateException

  Gets reader for the text file entry.

  Returns:
    The reader that can be used for reading the contents of the text 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.

### getReader

    java.io.Reader getReader(int maxLineLength)
                             throws java.io.IOException,
                                    java.rmi.RemoteException,
                                    java.lang.IllegalStateException

  Gets reader for the text file entry. The maximum line length is by the Requester transport when reading the text file; it identifies the maximum length of any line that will be in the file. This is typically set to some larger value than is actually used. If a huge number is specified, some hosts will adjust this down to a more reasonable value. Lines longer than this specified maxLineLength will be truncated

  The maximum line length parameter is only supported by the Requester transport; it will ignored by all other transports.

  Parameters:
    `maxLineLength` - the maximum length of any line that will be in the file. This parameter is supported by the Requester transport; it will be ignored by all other delivery transports.
  Returns:
    The reader that can be used for reading the contents of the text 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.