Programmer's Reference
UNIXReadPipeStream methods are described in the following
section.
- for:
- Answers a new, initialized instance of a UNIXReadPipeStream for
the specified process.
- atEnd
- Answers a Boolean that is true if the receiver
cannot access any more objects, otherwise answers false.
- blocking:
- Sets a Boolean that indicates whether or not the receiver will
block on I/O operations. Answers the receiver.
- close
- Closes the receiver's associated UNIX pipe. If any unread
information is available from the operating system, this is transferred to the
receiver. Closes the operating system pipe. The receiver is no
longer valid for fill operations. Answers the receiver.
- contents
- Answers the current contents of the receiver as a
String.
- copyFrom:to:
- Answers the subcollection of the collection over which the receiver is
streaming, from the first specified index to the last specified index.
If the receiver is blocking, enough data is read to satisfy the request, or
until atEnd is true. If the receiver is non-blocking, then
it uses only currently available data.
- do:
- Evaluates the specified block once for each element in the receiver, from
the element after the current position to the end. If the receiver is
blocking, data is read until atEnd is true. If
the receiver is non-blocking then it uses only currently available
data.
- fill
- Guarantees that any pending data from the receiver's UNIX process has
been flushed to the pipe stream. Answers the receiver.
- isBlocking
- Answers true if the receiver has been set to block on I/O,
otherwise answers false.
- isBytes
- Answers true if the receiver handles I/O data as bytes,
otherwise answers false.
- isBytes:
- If flag is true, sets the receiver's I/O data type to
bytes. If flag is false, sets the I/O data type to
characters. Answers the receiver.
- isCharacters
- Answers true if the receiver answers I/O data as
characters.
- isCharacters:
- If flag is true, sets the receiver's I/O data type to
characters. If flag is false, sets the I/O data type to
bytes. Answers the receiver.
- isEmpty
- Answers true if the receiver pipe stream currently contains no
elements, otherwise answers false.
- lineDelimiter
- Returns the line delimiter of the receiver.
- lineDelimiter:
- Sets the line delimiter of the receiver.
- next
- Answers the next character accessible by the receiver and advances the
receiver's position. Answers nil if the read would
block. Reports an error if no data is available to be read.
- next:
- Answers the next specified integer number of items from the receiver,
returned in a collection of the same type as the collection being streamed
over. If the receiver's state is such that there are fewer than
the specified number of integer elements between its current position and the
end of the stream, the operation fails, and the receiver is left in a state
such that it answers true to the atEnd message.
- nextLine
- Answers the elements between the current position and the next
lineDelimiter.
- nextMatchFor:
- Answers true if the next element which is accessible by the
receiver is equal to the target, otherwise answers false.
- peek
- Answers the next object in the receiver stream without advancing the
receiver's position. If the receiver is positioned at the end,
answers nil.
- peekFor:
- Answers true if the next object to be accessed in the receiver
stream equals the specified byte or character, otherwise answers
false. Only advances the receiver's position if the
answers is true.
- position
- Answers the current position of the receiver.
- position:
- Sets the current position of the receiver to the specified integer.
If the position is out of bounds, sets the position to the closest valid
position.
- reset
- Positions the receiver to the beginning of the collection being streamed
over. Answers the receiver.
- setToEnd
- Sets the receiver's position reference to be the size of the
underlying contents. Answers the receiver.
- size
- Answers the number of elements in the receiver.
- skip:
- Increments the position of the receiver by the specified integer.
Fails if the argument is not a kind of integer. Answers the
receiver.
- skipTo:
- Advances the receiver's position beyond the next occurrence of the
specified object, or if none, to the end of stream. Answers
true if the object occurred, otherwise answers
false.
- Note:
- skipTo: is a blocking operation.
- skipToAll:
- Advances the receiver's position beyond the next occurrence of the
elements of the sequential collection, or if none, to the end of
stream. Answers true if the elements of the sequential
collection occurred, otherwise answers false. Non-blocking
streams operate on the currently available data.
- upTo:
- Answers the collection of objects from the receiver starting with the next
accessible object and up to but not including the specified object.
Sets the position beyond the object. If the object is not present,
answers the remaining elements of the stream. Non-blocking streams
operate on the currently available data.
- upToAll:
- Answers the collection of objects from the receiver starting with the next
accessible object and up to but not including the specified sequential
collection. Sets the position beyond the sequential collection.
If the sequential collection is not present, answers the remaining elements of
the stream. Non-blocking streams operate on the currently available
data.
- upToEnd
- Answers the subcollection of the collection over which the receiver is
streaming, from the current position to the end of the accessible
elements. Non-blocking streams operate on the currently available
data.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]