This is the circular-streams Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:36:27 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
circular-streams
Circularly readable streams for Common Lisp
Tomohiro Matsuyama
LLGPL
# Circular-Streams - Circularly readable streams for Common Lisp
[![Build Status](https://travis-ci.org/fukamachi/circular-streams.svg?branch=master)](https://travis-ci.org/fukamachi/circular-streams)
[![Coverage Status](https://coveralls.io/repos/github/fukamachi/circular-streams/badge.svg?branch=master)](https://coveralls.io/github/fukamachi/circular-streams?branch=master)
## Usage
(defparameter *stream*
(flex:make-in-memory-input-stream
#(72 101 108 108 111)))
(defparameter *circular-stream*
(make-circular-stream *stream*))
(read-char *circular-stream*) ;=> #\H
(read-char *circular-stream*) ;=> #\e
(read-char *circular-stream*) ;=> #\l
(read-char *circular-stream*) ;=> #\l
(read-char *circular-stream*) ;=> #\o
(read-char *circular-stream* nil :eof) ;=> :eof
(let ((buf (make-array 5 :adjustable t :fill-pointer 5)))
(read-sequence buf *circular-stream*)
(flex:octets-to-string buf))
;=> "Hello"
## Description
Circular-Streams allows you to read streams circularly by wrapping real streams. Once you reach end-of-file of a stream, it’s file position will be reset to 0 and you’re able to read it again.
Note this library can treat only octet streams which has a method ‘read-byte‘. This might be expanded in the future.
This library was originally written by Tomohiro Matsuyama as a part of [Clack](http://clacklisp.org), Eitaro Fukamachi ported it with some improvements.
## API Reference
### [Class] circular-input-stream
Class for circular input streams. ‘make-circular-input-stream‘ is available to create an instance.
### [Function] make-circular-stream
Creates ‘circular-input-stream‘ and returns it.
## Author
* Tomohiro Matsuyama (tomo@cx4a.org)
* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
Copyright (c) 2011-2012 Tomohiro Matsuyama (tomo@cx4a.org)
Copyright (c) 2012-2016 Eitaro Fukamachi (e.arrows@gmail.com)
# License
Licensed under the LLGPL License.
# See Also
* [Gray streams](http://www.cliki.net/Gray%20streams)
* [trivial-gray-streams](http://www.cliki.net/trivial-gray-streams)
0.1
fast-io
(system).
trivial-gray-streams
(system).
src
(module).
Modules are listed depth-first from the system components tree.
circular-streams/src
circular-streams
(system).
circular-streams.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
circular-streams/circular-streams.asd
circular-streams
(system).
circular-streams/src/circular-streams.lisp
src
(module).
circular-input-stream
(class).
circular-stream-buffer
(reader method).
circular-stream-position
(reader method).
(setf circular-stream-position)
(writer method).
circular-stream-stream
(reader method).
make-circular-input-stream
(function).
stream-element-type
(method).
(setf stream-file-position)
(method).
stream-file-position
(method).
stream-listen
(method).
stream-read-byte
(method).
stream-read-char
(method).
stream-read-line
(method).
stream-read-sequence
(method).
extend-buffer
(function).
extend-buffer-one
(function).
fast-buffer-aref
(function).
Packages are listed by definition order.
circular-streams
common-lisp
.
trivial-gray-streams
.
circular-input-stream
(class).
circular-stream-buffer
(generic reader).
circular-stream-position
(generic reader).
(setf circular-stream-position)
(generic writer).
circular-stream-stream
(generic reader).
make-circular-input-stream
(function).
make-circular-stream
(function).
extend-buffer
(function).
extend-buffer-one
(function).
fast-buffer-aref
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Creates ‘circular-input-stream’ and returns it. If ‘:buffer’ is specified, the instance uses it as an internal buffer. You need this to reuse ‘circular-input-stream’ without saving itself.
Creates ‘circular-input-stream’ and returns it. If ‘:buffer’ is specified, the instance uses it as an internal buffer. You need this to reuse ‘circular-input-stream’ without saving itself.
circular-input-stream
)) ¶automatically generated reader method
circular-input-stream
)) ¶automatically generated reader method
circular-input-stream
)) ¶automatically generated writer method
circular-input-stream
)) ¶automatically generated reader method
circular-input-stream
)) ¶circular-input-stream
)) ¶trivial-gray-streams
.
circular-input-stream
)) ¶trivial-gray-streams
.
circular-input-stream
)) ¶sb-gray
.
circular-input-stream
)) ¶sb-gray
.
circular-input-stream
)) ¶sb-gray
.
circular-input-stream
)) ¶sb-gray
.
circular-input-stream
) sequence start end &key) ¶trivial-gray-streams
.
Class for circular input streams.
fundamental-binary-input-stream
.
trivial-gray-stream-mixin
.
common-lisp
.
:stream
This slot is read-only.
(fast-io:make-output-buffer)
:buffer
This slot is read-only.
common-lisp
.
0
Jump to: | (
C E F G M S |
---|
Jump to: | (
C E F G M S |
---|
Jump to: | B P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
B | |||
buffer : | Public classes | ||
| |||
P | |||
position : | Public classes | ||
| |||
S | |||
Slot, buffer : | Public classes | ||
Slot, position : | Public classes | ||
Slot, stream : | Public classes | ||
stream : | Public classes | ||
|
Jump to: | B P S |
---|
Jump to: | C F M P S |
---|
Jump to: | C F M P S |
---|