*** 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 TypeMethodDescriptionStringReturns the MIME type associated with this text file entry.StringgetName()Returns the name of the file.ReaderGets reader for the text file entry.ReadergetReader(int maxLineLength) Gets reader for the text file entry.ReadergetReader(Object readerID) Deprecated.com.sas.io.RemoteReaderInterfacegetRemoteReader(Object readerID) Deprecated.UsegetReader()which now supports remote readers.ObjectDeprecated.this method no longer needed as getReader() will return a reader that can be used in a remote environmentvoidsetEncoding(String encoding) Sets the encoding of the text file.voidsetMIMEType(String mimeType) Sets the MIME type for this text 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 text file entry. The user-specified MIME type is assigned when the text file entry is published.- Returns:
StringThe MIME type associated with this text 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 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
Returns the name of the file.- Returns:
StringThe 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.UsegetReader()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 utilizegetRemoteReader(java.lang.Object)in order to obtain the reader.- Specified by:
getReaderin interfacecom.sas.io.ReaderProviderInterface- Parameters:
readerID- The reader description should benull; 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.UsegetReader()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:
getRemoteReaderin interfacecom.sas.io.ReaderProviderInterface- Parameters:
readerID- The reader description should benull; it will be ignored.- Returns:
RemoteReaderThe 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, RemoteExceptionDeprecated.this method no longer needed as getReader() will return a reader that can be used in a remote environmentCheck if getReader(java.lang.Object) will succeeed.- Specified by:
hasReaderin interfacecom.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 objectRemoteException- if a network I/O error occurs.
-
getReader
Reader getReader() throws IOException, RemoteException, IllegalStateExceptionGets 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 truncatedThe 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.
-
getReader()which now supports remote readers.