Read/Write using DataInputStream/DataOutputStream & InputStream/OutputStream
Read/Write using DataInputStream/DataOutputStream & InputStream/OutputStream
(create-temp-directory prefix)
(create-temp-directory dir prefix)
Inputs: ([prefix :- (s/cond-pre File s/Str Path)] [dir :- (s/cond-pre File s/Str Path) prefix :- s/Str]) Returns: File
Creates a temporary directory with the given [dir
and] prefix
Inputs: ([prefix :- (s/cond-pre File s/Str Path)] [dir :- (s/cond-pre File s/Str Path) prefix :- s/Str]) Returns: File Creates a temporary directory with the given [`dir` and] prefix
(create-temp-file prefix suffix)
(create-temp-file dir prefix suffix)
Inputs: ([prefix :- s/Str suffix :- (s/maybe s/Str)] [dir :- (s/cond-pre File s/Str Path) prefix :- s/Str suffix :- (s/maybe s/Str)]) Returns: File
Given a Path dir unique ID string (e.g. 'my.dummy.file'), returns a java File object for a temporary that will be deleted upon JVM exit.
Inputs: ([prefix :- s/Str suffix :- (s/maybe s/Str)] [dir :- (s/cond-pre File s/Str Path) prefix :- s/Str suffix :- (s/maybe s/Str)]) Returns: File Given a Path dir unique ID string (e.g. 'my.dummy.file'), returns a java File object for a temporary that will be deleted upon JVM exit.
(data-input-stream? arg)
Inputs: [arg]
Returns true if arg implements java.io.DataInputStream
Inputs: [arg] Returns true if arg implements java.io.DataInputStream
(data-output-stream? arg)
Inputs: [arg]
Returns true if arg implements java.io.DataOutputStream
Inputs: [arg] Returns true if arg implements java.io.DataOutputStream
(delete-directory-recursive dir-name)
Inputs: [dir-name :- s/Str]
Recursively deletes a directory and all its contents. Returns count of objects deleted. Idempotent in case dir is already deleted.
Inputs: [dir-name :- s/Str] Recursively deletes a directory and all its contents. Returns count of objects deleted. Idempotent in case dir is already deleted.
(delete-file-if-exists arg)
Inputs: [arg :- (s/cond-pre s/Str File Path)] Returns: s/Bool
Deletes a file if it exists. Accepts String, File, or Path arg.
Inputs: [arg :- (s/cond-pre s/Str File Path)] Returns: s/Bool Deletes a file if it exists. Accepts String, File, or Path arg.
(file-exists? arg)
Inputs: [arg :- (s/cond-pre s/Str File Path)] Returns: s/Bool
Returns true iff a file exists
Inputs: [arg :- (s/cond-pre s/Str File Path)] Returns: s/Bool Returns true iff a file exists
(File? arg)
Inputs: [arg :- s/Any] Returns: s/Bool
Returns true iff arg is a java.io.File
Inputs: [arg :- s/Any] Returns: s/Bool Returns true iff arg is a java.io.File
(input-stream? arg)
Inputs: [arg]
Returns true if arg implements java.io.InputStream
Inputs: [arg] Returns true if arg implements java.io.InputStream
(mkdirs arg)
Inputs: [arg :- (s/cond-pre s/Str File Path)]
Creates a directory and all parent dirs.
Inputs: [arg :- (s/cond-pre s/Str File Path)] Creates a directory and all parent dirs.
(mkdirs-parent arg)
Inputs: [arg :- (s/cond-pre s/Str File Path)]
Creates all parent dirs of a file. Accepts String, File, or Path arg.
Inputs: [arg :- (s/cond-pre s/Str File Path)] Creates all parent dirs of a file. Accepts String, File, or Path arg.
(output-stream? arg)
Inputs: [arg]
Returns true if arg implements java.io.OutputStream
Inputs: [arg] Returns true if arg implements java.io.OutputStream
(Path? arg)
Inputs: [arg :- s/Any] Returns: s/Bool
Returns true iff arg is a java.io.Path
Inputs: [arg :- s/Any] Returns: s/Bool Returns true iff arg is a java.io.Path
(read-byte dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 1 byte (signed) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 1 byte (signed) from a DataInputStream
(read-byte-unsigned dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 1 byte (unsigned) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 1 byte (unsigned) from a DataInputStream
(read-bytes N input-stream)
Inputs: [N :- s/Int input-stream :- InputStream]
Reads N bytes from a DataInputStream, returning a byte array.
Inputs: [N :- s/Int input-stream :- InputStream] Reads N bytes from a DataInputStream, returning a byte array.
(read-double dis)
Inputs: [dis :- DataInputStream] Returns: s/Num
Reads an 8 byte double-precision floating-point value from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Num Reads an 8 byte double-precision floating-point value from a DataInputStream
(read-float dis)
Inputs: [dis :- DataInputStream] Returns: s/Num
Reads a 4 byte single-precision floating-point value from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Num Reads a 4 byte single-precision floating-point value from a DataInputStream
(read-integer dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 4 bytes (signed) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 4 bytes (signed) from a DataInputStream
(read-integer-unsigned dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 4 bytes (unsigned) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 4 bytes (unsigned) from a DataInputStream
(read-long dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 8 bytes (signed) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 8 bytes (signed) from a DataInputStream
(read-long-unsigned dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 8 bytes (unsigned) from a DataInputStream, returning a BigInteger
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 8 bytes (unsigned) from a DataInputStream, returning a BigInteger
(read-short dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 2 bytes (signed) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 2 bytes (signed) from a DataInputStream
(read-short-unsigned dis)
Inputs: [dis :- DataInputStream] Returns: s/Int
Reads 2 bytes (unsigned) from a DataInputStream
Inputs: [dis :- DataInputStream] Returns: s/Int Reads 2 bytes (unsigned) from a DataInputStream
(read-string-bytes nchars dis)
Inputs: [nchars :- s/Int dis :- DataInputStream] Returns: s/Str
Reads nchars bytes from a DataInputStream, returning a String.
Inputs: [nchars :- s/Int dis :- DataInputStream] Returns: s/Str Reads nchars bytes from a DataInputStream, returning a String.
(write-byte dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 1 byte (signed) to a DataOutputStream.
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 1 byte (signed) to a DataOutputStream.
(write-byte-unsigned dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 1 byte (unsigned) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 1 byte (unsigned) to a DataOutputStream
(write-bytes out-stream bytarr)
Inputs: [out-stream :- OutputStream bytarr :- s/Any]
Writes a byte array to a DataOutputStream.
Inputs: [out-stream :- OutputStream bytarr :- s/Any] Writes a byte array to a DataOutputStream.
(write-double dos val)
Inputs: [dos :- DataOutputStream val :- s/Num] Returns: s/Num
Writes an 8 byte double-precision floating-point value to a DataInputStream
Inputs: [dos :- DataOutputStream val :- s/Num] Returns: s/Num Writes an 8 byte double-precision floating-point value to a DataInputStream
(write-float dos val)
Inputs: [dos :- DataOutputStream val :- s/Num] Returns: s/Num
Writes a 4 byte single-precision floating-point value to a DataInputStream
Inputs: [dos :- DataOutputStream val :- s/Num] Returns: s/Num Writes a 4 byte single-precision floating-point value to a DataInputStream
(write-integer dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 4 bytes (signed) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 4 bytes (signed) to a DataOutputStream
(write-integer-unsigned dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 4 bytes (signed) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 4 bytes (signed) to a DataOutputStream
(write-long dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 8 bytes (signed) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 8 bytes (signed) to a DataOutputStream
(write-long-unsigned dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 8 bytes (unsigned) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 8 bytes (unsigned) to a DataOutputStream
(write-short dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 2 bytes (signed) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 2 bytes (signed) to a DataOutputStream
(write-short-unsigned dos val)
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int
Writes 2 bytes (unsigned) to a DataOutputStream
Inputs: [dos :- DataOutputStream val :- s/Int] Returns: s/Int Writes 2 bytes (unsigned) to a DataOutputStream
(write-string-bytes dos str-val)
Inputs: [dos :- DataOutputStream str-val :- s/Str] Returns: s/Str
Converts an ASCII String to bytes and writes them to a DataInputStream (w/o length header).
Inputs: [dos :- DataOutputStream str-val :- s/Str] Returns: s/Str Converts an ASCII String to bytes and writes them to a DataInputStream (w/o length header).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close