Liking cljdoc? Tell your friends :D

datoteka.io

IO helpers (experimental, changes expected).

IO helpers (experimental, changes expected).
raw docstring

bounded-input-streamclj

(bounded-input-stream input
                      size
                      &
                      {:keys [propagate-close] :or {propagate-close true}})

Creates an instance of InputStream bounded to a specified size.

Creates an instance of InputStream bounded to a specified size.
raw docstring

buffered-input-streamclj

(buffered-input-stream input
                       &
                       {:keys [buffer-size]
                        :or {buffer-size default-buffer-size}})

buffered-output-streamclj

(buffered-output-stream output
                        &
                        {:keys [buffer-size]
                         :or {buffer-size default-buffer-size}})

bytes-input-streamclj

(bytes-input-stream data & {:keys [offset size]})

Creates an instance of unsyncronized ByteArrayInputStream instance holding the provided data.

Creates an instance of unsyncronized ByteArrayInputStream instance holding the
provided data.
raw docstring

bytes-output-streamclj

(bytes-output-stream & {:keys [size]})

Creates an instance of ByteArrayOutputStream.

Creates an instance of ByteArrayOutputStream.
raw docstring

close!clj

(close! stream)

Close any AutoCloseable resource.

Close any AutoCloseable resource.
raw docstring

coercible?clj

(coercible? o)

Check if the provided object can be coercible to input stream or output stream. In other workds: checks if it satisfies the jio/IOFactory protocol.

Check if the provided object can be coercible to input stream or
output stream. In other workds: checks if it satisfies the
jio/IOFactory protocol.
raw docstring

copy!clj

(copy! src
       dst
       &
       {:keys [offset size buffer-size]
        :or {offset 0 size -1 buffer-size default-buffer-size}})

Efficiently copy data from src (should be instance of InputStream) to the dst (which should be instance of OutputStream).

You can specify the size for delimit how much bytes should be written to the dst.

Efficiently copy data from `src` (should be instance of
InputStream) to the `dst` (which should be instance of
OutputStream).

You can specify the size for delimit how much bytes should be
written to the `dst`.
raw docstring

data-input-streamclj

(data-input-stream input)

data-input-stream?clj

(data-input-stream? s)

Check if provided object is an instance of DataInputStream.

Check if provided object is an instance of DataInputStream.
raw docstring

data-output-streamclj

(data-output-stream output)

data-output-stream?clj

(data-output-stream? s)

Check if provided object is an instance of DataOutputStream.

Check if provided object is an instance of DataOutputStream.
raw docstring

default-buffer-sizeclj


flush!clj

(flush! stream)

Flush the OutputStream

Flush the OutputStream
raw docstring

input-streamclj

(input-stream x & {:as opts})

Attempts to coerce its argument into an open java.io.InputStream. Default implementations always return a java.io.BufferedInputStream.

Convenciency API, it forwards directly to the clojure.java.io/make-input-stream.

Attempts to coerce its argument into an open java.io.InputStream.
Default implementations always return a java.io.BufferedInputStream.

Convenciency API, it forwards directly to the
`clojure.java.io/make-input-stream`.
raw docstring

input-stream?clj

(input-stream? s)

Check if provided object is an instance of InputStream.

Check if provided object is an instance of InputStream.
raw docstring

output-streamclj

(output-stream x & {:as opts})

Attempts to coerce its argument into an open java.io.InputStream. Default implementations always return a java.io.BufferedInputStream.

Convenciency API, it forwards directly to the clojure.java.io/make-output-stream.

Attempts to coerce its argument into an open java.io.InputStream.
Default implementations always return a java.io.BufferedInputStream.

Convenciency API, it forwards directly to the
`clojure.java.io/make-output-stream`.
raw docstring

output-stream?clj

(output-stream? s)

Check if provided object is an instance of OutputStream.

Check if provided object is an instance of OutputStream.
raw docstring

read-as-bytesclj

(read-as-bytes input & {:keys [size offset close] :or {close false} :as opts})

Read all data or specified size input and return a byte array.

Read all data or specified size input and return a byte array.
raw docstring

readerclj

(reader x & {:as opts})

Attempts to coerce its argument into an open java.io.Reader. Default implementations always return a java.io.BufferedReader.

Convenciency API, it forwards directly to the clojure.java.io/make-reader.

Attempts to coerce its argument into an open java.io.Reader.
Default implementations always return a java.io.BufferedReader.

Convenciency API, it forwards directly to the
`clojure.java.io/make-reader`.
raw docstring

resourceclj

(resource x)
(resource x loader)

Returns the URL for a named resource. Use the context class loader if no loader is specified. Convenciency API, it forwards directly to the clojure.java.io/resource.

Returns the URL for a named resource. Use the context class loader
if no loader is specified.
Convenciency API, it forwards directly to the
`clojure.java.io/resource`.
raw docstring

write!clj

(write! src dst & {:keys [size offset close] :or {close false} :as opts})

Writes content from src to the dst.

If dst in an OutputStream it will be closed when copy is finished, you can pass :close? option with false for avoid this behavior.

If size is provided, no more than that bytes will be written to the dst.

Writes content from `src` to the `dst`.

If `dst` in an OutputStream it will be closed when copy is finished,
you can pass `:close?` option with `false` for avoid this behavior.

If size is provided, no more than that bytes will be written to the
`dst`.
raw docstring

write-to-file!cljdeprecated

(write-to-file! src dst & {:as opts})

writerclj

(writer x & {:as opts})

Attempts to coerce its argument into an open java.io.Writer. Default implementations always return a java.io.BufferedWriter.

Convenciency API, it forwards directly to the clojure.java.io/make-writer.

Attempts to coerce its argument into an open java.io.Writer.
Default implementations always return a java.io.BufferedWriter.

Convenciency API, it forwards directly to the
`clojure.java.io/make-writer`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close