Liking cljdoc? Tell your friends :D

libmisc-clj.jnio


bufferclj

(buffer x)

Coerces its argument into a java.nio.Buffer. If the argument is already a Buffer this is a no-op. Otherwise, return an appropriate buffer type. Implemented for byte array, char array, double array, float array, int array, long array, and short array.

Coerces its argument into a java.nio.Buffer. If the argument is
already a Buffer this is a no-op. Otherwise, return an appropriate
buffer type. Implemented for byte array, char array, double array,
float array, int array, long array, and short array.
sourceraw docstring

buffer-nthclj

(buffer-nth x n)
(buffer-nth x n not-found)

Returns element n of a java.nio.Buffer. Does not change the position of the Buffer.

Returns element n of a java.nio.Buffer. Does not change the
position of the Buffer.
sourceraw docstring

buffer-seqclj

(buffer-seq x)

Returns a seq that iterates over the elements in a java.nio.Buffer. Does not change the position of the Buffer.

Returns a seq that iterates over the elements in a
java.nio.Buffer. Does not change the position of the Buffer.
sourceraw docstring

buffer-to-arrayclj

(buffer-to-array x)

Returns an array representation of a java.nio.Buffer. Creates a new array (even for an array backed Buffer), and copies each element of the Buffer into the array, respecting the Buffer's limit. Does not change the position of the Buffer.

Returns an array representation of a java.nio.Buffer. Creates a new
array (even for an array backed Buffer), and copies each element of
the Buffer into the array, respecting the Buffer's limit. Does not
change the position of the Buffer.
sourceraw docstring

byte-array-typeclj

source

byte-bufferclj

(byte-buffer x)

Coerces its argument into a java.nio.ByteBuffer. If the argument that is already a ByteBuffer this is a no-op. Implemented for byte array.

Coerces its argument into a java.nio.ByteBuffer. If the argument
that is already a ByteBuffer this is a no-op. Implemented for byte
array.
sourceraw docstring

byte-orderclj

(byte-order buf)

Returns the byte order for buf as a keyword, either :big-endian or :little-endian.

Returns the byte order for buf as a keyword, either :big-endian
or :little-endian.
sourceraw docstring

byte-order-to-keywordclj

source

channelclj

(channel x)

Attempts to coerce its argument into an open java.nio.ByteChannel.

Default implementations are defined for ByteChannel, File, RandomAccessFile, Socket, and DatagramSocket arguments.

Should be used inside with-open to ensure the WritableByteChannel is properly closed.

Attempts to coerce its argument into an open java.nio.ByteChannel.

Default implementations are defined for ByteChannel, File,
RandomAccessFile, Socket, and DatagramSocket arguments.

Should be used inside with-open to ensure the WritableByteChannel is
properly closed.
sourceraw docstring

char-array-typeclj

source

char-bufferclj

(char-buffer x)

Coerces its argument into a java.nio.CharBuffer. If the argument that is already a CharBuffer this is a no-op. Implemented for byte array, ByteBuffer, char array, and CharSequence (which includes String).

Coerces its argument into a java.nio.CharBuffer. If the argument
that is already a CharBuffer this is a no-op. Implemented for byte
array, ByteBuffer, char array, and CharSequence (which includes
String).
sourceraw docstring

default-channels-implclj

source

double-array-typeclj

source

double-bufferclj

(double-buffer x)

Coerces its argument into a java.nio.DoubleBuffer. If the argument that is already a DoubleBuffer this is a no-op. Implemented for byte array, ByteBuffer, and double array.

Coerces its argument into a java.nio.DoubleBuffer. If the argument
that is already a DoubleBuffer this is a no-op. Implemented for byte
array, ByteBuffer, and double array.
sourceraw docstring

float-array-typeclj

source

float-bufferclj

(float-buffer x)

Coerces its argument into a java.nio.FloatBuffer. If the argument that is already a FloatBuffer this is a no-op. Implemented for byte array, ByteBuffer, and float array.

Coerces its argument into a java.nio.FloatBuffer. If the argument
that is already a FloatBuffer this is a no-op. Implemented for byte
array, ByteBuffer, and float array.
sourceraw docstring

int-array-typeclj

source

int-bufferclj

(int-buffer x)

Coerces its argument into a java.nio.IntBuffer. If the argument that is already a IntBuffer this is a no-op. Implemented for byte array, ByteBuffer, and int array.

Coerces its argument into a java.nio.IntBuffer. If the argument
that is already a IntBuffer this is a no-op. Implemented for byte
array, ByteBuffer, and int array.
sourceraw docstring

keyword-to-byte-orderclj

source

long-array-typeclj

source

long-bufferclj

(long-buffer x)

Coerces its argument into a java.nio.LongBuffer. If the argument that is already a LongBuffer this is a no-op. Implemented for byte array, ByteBuffer, and long array.

Coerces its argument into a java.nio.LongBuffer. If the argument
that is already a LongBuffer this is a no-op. Implemented for byte
array, ByteBuffer, and long array.
sourceraw docstring

mmapclj

(mmap file & [offset length & {:as opts}])

Memory maps a file with optional offset and length arguments to map only a portion of the file. Accepts keyword :mode option for the mapping mode. Valid options are: :read-write, :read-only, :private. Implemented for String, File and FileChannel.

Memory maps a file with optional offset and length arguments to map
only a portion of the file. Accepts keyword :mode option for the
mapping mode. Valid options are: :read-write, :read-only, :private.
Implemented for String, File and FileChannel.
sourceraw docstring

readable-channelclj

(readable-channel x)

Attempts to coerce its argument into an open java.nio.ReadableByteChannel.

Default implementations are defined for ReadableByteChannel, ByteChannel, Pipe, InputStream, File, RandomAccessFile, Socket, and DatagramSocket arguments.

Should be used inside with-open to ensure the ReadableByteChannel is properly closed.

Attempts to coerce its argument into an open
java.nio.ReadableByteChannel.

Default implementations are defined for ReadableByteChannel,
ByteChannel, Pipe, InputStream, File, RandomAccessFile, Socket, and
DatagramSocket arguments.

Should be used inside with-open to ensure the ReadableByteChannel is
properly closed.
sourceraw docstring

set-byte-order!clj

(set-byte-order! buf order)

Sets the byte order for buf, order should be either :big-endian or :little-endian.

Sets the byte order for buf, order should be either :big-endian
or :little-endian.
sourceraw docstring

short-array-typeclj

source

short-bufferclj

(short-buffer x)

Coerces its argument into a java.nio.ShortBuffer. If the argument that is already a Short this is a no-op. Implemented for byte array, ByteBuffer, and short array.

Coerces its argument into a java.nio.ShortBuffer. If the argument
that is already a Short this is a no-op. Implemented for byte
array, ByteBuffer, and short array.
sourceraw docstring

writable-channelclj

(writable-channel x)

Attempts to coerce its argument into an open java.nio.WritableByteChannel.

Default implementations are defined for WritableByteChannel, ByteChannel, Pipe, OutputStream, File, RandomAccessFile, Socket, and DatagramSocket arguments.

Should be used inside with-open to ensure the WritableByteChannel is properly closed.

Attempts to coerce its argument into an open
java.nio.WritableByteChannel.

Default implementations are defined for WritableByteChannel,
ByteChannel, Pipe, OutputStream, File, RandomAccessFile, Socket, and
DatagramSocket arguments.

Should be used inside with-open to ensure the WritableByteChannel is
properly closed.
sourceraw docstring

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

× close