BARE-STREAM (STREAM &KEY (DIRECTION OUTPUT))
RETURN: A stream or a list of streams that are not compound streams (and therefore usable by #+clisp SOCKET:SOCKET-STATUS).
CONTENTS-FROM-STREAM (STREAM &KEY LENGTH (MIN-SIZE 256) MAX-EXTEND)
STREAM: May be a binary or character, file or non-file stream. LENGTH: NIL, or the number of stream elements to read. MIN-SIZE: Minimum pre-allocated buffer size. If LENGTH is given, or STREAM has a FILE-LENGTH, then the MIN-SIZE is ignored. MAX-EXTEND: NIL ==> double the buffer size, or double the buffer size until it's greater than MAX-EXTEND, and then increment by MAX-EXTEND. RETURN: A vector containing the elements read from the STREAM.
COPY-OVER (STREAM FROM-POS TO-POS &KEY (ELEMENT-TYPE 'CHARACTER))
DO: Copies elements from the FROM-POS to the end of the STREAM to the TO-POS. POST: (file-position stream) == (+ to-pos (- eof-pos from-ops)) NOTE: The file is not truncated.
COPY-STREAM (FROM TO)
Copy into TO from FROM until end of the input file. Do not translate or otherwise maul anything. AUTHORS: Daniel Barlow, Xarch
RETURN: the list of lines collected from stream.
SPLIT-STRING (STRING &OPTIONAL (SEPARATORS ) (REMOVE-EMPTY NIL))
STRING: A sequence. SEPARATOR: A sequence. RETURN: A list of subsequence of STRING, split upon any element of SEPARATORS. Separators are compared to elements of the STRING with EQL. NOTE: It's actually a simple split-sequence now. EXAMPLES: (split-string '(1 2 0 3 4 5 0 6 7 8 0 9) '(0)) --> ((1 2) (3 4 5) (6 7 8) (9)) (split-string #(1 2 0 3 4 5 0 6 7 8 0 9) #(0)) --> (#(1 2) #(3 4 5) #(6 7 8) #(9)) (split-string "1 2 0 3 4 5 0 6 7 8" '(#space #0)) --> ("1" "2" "" "" "3" "4" "5" "" "" "6" "7" "8")
WITH-INPUT-FROM-BYTE-VECTOR ((VAR BYTE-VECTOR &KEY INDEX START END) &BODY BODY)
DO: Execute the BODY with VAR bound to an input byte vector stream reading bytes from the BYTE-VECTOR, from START to END. If INDEX is given it should be a place into which the last position is stored. RETURN: The last position.
WITH-OUTPUT-TO-BYTE-VECTOR ((VAR &OPTIONAL BYTE-VECTOR-FORM &KEY ELEMENT-TYPE) &BODY BODY)
DO: Execute the BODY with VAR bound to an output byte vector stream. If BYTE-VECTOR-FORM is given it should produce a byte vector with a fill-pointer where the bytes written to the bvstream are stored. ELEMENT-TYPE: The type of bytes. If BYTE-VECTOR-FORM is nil, one can choose a different element-type for the byte vector. RETURN: The byte vector written.
BVSTREAM-POSITION (BVSTREAM POSITION)
Set the position of the BVSTREAM.
Read a byte from the BVSTREAM.
BVSTREAM-WRITE-BYTE (BVSTREAM BYTE)
Write a byte to the BVSTREAM.
RETURN: A simple INPUT-STREAM.
RETURN: A simple OUTPUT-STREAM.
SETFBIS-POSITION (NEW-VALUE OBJECT)
SETFBYTE-VECTOR (NEW-VALUE OBJECT)
SET-BYTES (NEW-VALUE OBJECT)
An input byte vector stream.
An output byte vector stream.