(clojure-decoder reader eof)
(clojure-decoder options reader eof)
Decodes one item from reader returning eof if the end of the reader is reached, and passes options along to clojure.core/read.
Decodes one item from reader returning eof if the end of the reader is reached, and passes options along to clojure.core/read.
(clojure-open stream)
(clojure-open encoding stream)
Used as the open function for decoding clojure. Returns a java.io.PushbackReader instance for use with clojure.core/read.
Used as the open function for decoding clojure. Returns a java.io.PushbackReader instance for use with clojure.core/read.
(decode! decoder stream)
(decode! decoder {:as options :keys [open close]} stream)
Creates a reducible, seqable object that will decode (using the decoder function) a stream created by calling the specified open function (or clojure.java.io/input-stream if open is not specified). This object will manage the stream (i.e. it will close it when the object has been reduced/seq'ed).
If this object is seq'ed it will entirely consume the stream, fully realize in memory the decoded sequence, closed close the stream, then return the sequence.
If this object is reduced it will entirely consume the stream, fully realize in memory the decoded/reduced sequence, close the stream, then return the sequence.
However, if a transducer is applied to this object it will only consume as much of the stream as is necessary, then it will close the stream before terminating the reduction early.
An optional open function can be specified. It will take the stream and the returned object will be given to the decoder function.
If the open function is not specified, then clojure.java.io/input-stream will be used.
An optional close function can be specified. When the reduction has terminated the close function will be called and given the object returned from the open function.
If the close function is not specified and the object returned by the open function implements java.io.Closeable, then it will be closed. Otherwise the close function is a no-op.
Creates a reducible, seqable object that will decode (using the decoder function) a stream created by calling the specified open function (or clojure.java.io/input-stream if open is not specified). This object will manage the stream (i.e. it will close it when the object has been reduced/seq'ed). If this object is seq'ed it will entirely consume the stream, fully realize in memory the decoded sequence, closed close the stream, then return the sequence. If this object is reduced it will entirely consume the stream, fully realize in memory the decoded/reduced sequence, close the stream, then return the sequence. However, if a transducer is applied to this object it will only consume as much of the stream as is necessary, then it will close the stream before terminating the reduction early. An optional open function can be specified. It will take the stream and the returned object will be given to the decoder function. If the open function is not specified, then clojure.java.io/input-stream will be used. An optional close function can be specified. When the reduction has terminated the close function will be called and given the object returned from the open function. If the close function is not specified and the object returned by the open function implements java.io.Closeable, then it will be closed. Otherwise the close function is a no-op.
(decode-clojure! stream)
(decode-clojure! options stream)
Decodes a stream of clojure data, the :encoding option will be passed to clojure-open, and all other options are passed along to clojure.core/read. If the :encoding option is not specified, it will default to "UTF-8".
Decodes a stream of clojure data, the :encoding option will be passed to clojure-open, and all other options are passed along to clojure.core/read. If the :encoding option is not specified, it will default to "UTF-8".
(decode-edn! stream)
(decode-edn! options stream)
Decodes a stream of edn data, the :encoding option will be passed to edn-open, and all other options are passed along to clojure.edn/read. If the :encoding option is not specified, it will default to "UTF-8".
Decodes a stream of edn data, the :encoding option will be passed to edn-open, and all other options are passed along to clojure.edn/read. If the :encoding option is not specified, it will default to "UTF-8".
(decode-lines! stream)
(decode-lines! encoding stream)
Decodes a stream of text data line-by-line, the encoding option will be passed to lines-open. If the :encoding option is not specified, it will default to "UTF-8".
Decodes a stream of text data line-by-line, the encoding option will be passed to lines-open. If the :encoding option is not specified, it will default to "UTF-8".
(decode-transit! type stream)
(decode-transit! type options stream)
Decodes a stream of transit data passing options along to cognitect.transit/reader.
Decodes a stream of transit data passing options along to cognitect.transit/reader.
(edn-decoder reader eof)
(edn-decoder options reader eof)
Decodes one item from reader returning eof if the end of the reader is reached, and passes options along to clojure.edn/read.
Decodes one item from reader returning eof if the end of the reader is reached, and passes options along to clojure.edn/read.
(edn-open stream)
(edn-open encoding stream)
Used as the open function for decoding edn. Returns a java.io.PushbackReader instance for use with clojure.edn/read.
Used as the open function for decoding edn. Returns a java.io.PushbackReader instance for use with clojure.edn/read.
(lines-decoder reader eof)
Decodes one line of text from reader returning eof if the end of the reader is reached.
Decodes one line of text from reader returning eof if the end of the reader is reached.
(lines-open stream)
(lines-open encoding stream)
Used as the open function for decoding text. Returns a java.io.BufferedReader instance.
Used as the open function for decoding text. Returns a java.io.BufferedReader instance.
(transit-decoder read reader eof)
Decodes one item from reader returning eof if the end of the reader is reached.
Decodes one item from reader returning eof if the end of the reader is reached.
(transit-open type options stream)
Used as the open function for decoding transit. Passes along options to cognitect.transit/reader, and returns a transit reader for use with cognitect.transit/read.
Used as the open function for decoding transit. Passes along options to cognitect.transit/reader, and returns a transit reader for use with cognitect.transit/read.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close