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

Package com.sas.services.publish

# Interface TextFileEntryInterface

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

All Known Implementing Classes:
  `TextFileEntry`

@SASScope("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

  Modifier and Type
  Method
  Description
  `String`
  `getMIMEType()`
  Returns the MIME type associated with this text file entry.
  `String`
  `getName()`
  Returns the name of the file.
  `Reader`
  `getReader()`
  Gets reader for the text file entry.
  `Reader`
  `getReader(int maxLineLength)`
  Gets reader for the text file entry.
  `Reader`
  `getReader(Object readerID)`
  Deprecated.
  Use `getReader()` which now supports remote readers.
  `com.sas.io.RemoteReaderInterface`
  `getRemoteReader(Object readerID)`
  Deprecated.
  Use `getReader()` which now supports remote readers.
  `Object`
  `hasReader()`
  Deprecated.
  this method no longer needed as getReader() will return a reader that can be used in a remote environment
  `void`
  `setEncoding(String encoding)`
  Sets the encoding of the text file.
  `void`
  `setMIMEType(String mimeType)`
  Sets the MIME type for this text 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 TransportException, RemoteException, 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.
      `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 text file entry.
    Parameters:
      `mimeType` - The MIME type to associate with this text 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 of the file.
      `RemoteException` - If a network anomaly is encountered.
      `IllegalStateException` - If the package containing this entry is already closed.

  - ### setEncoding

    void setEncoding(String encoding) throws RemoteException, 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:
      `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

  - ### getReader

    Reader getReader(Object readerID) throws UnmarshalException, IOException, RemoteException, 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:
      `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.

  - ### getRemoteReader

    com.sas.io.RemoteReaderInterface getRemoteReader(Object readerID) throws IOException, RemoteException, 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:
      `IOException` - If an error occurs constructing the remote reader.
      `RemoteException` - If a network anomaly is encountered.
      `IllegalStateException` - If the package containing this entry is already closed.

  - ### hasReader

    Object hasReader() throws UnmarshalException, 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:
      `UnmarshalException` - if invoked on a remote object
      `RemoteException` - if a network I/O error occurs.

  - ### getReader

    Reader getReader() throws IOException, RemoteException, 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:
      `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.

  - ### getReader

    Reader getReader(int maxLineLength) throws IOException, RemoteException, 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:
      `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.