Liking cljdoc? Tell your friends :D

nio.core


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.
raw 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.
raw 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.
raw 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.
raw docstring

byte-array-typeclj


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.
raw 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.
raw docstring

byte-order-to-keywordclj


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.
raw docstring

char-array-typeclj


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).
raw docstring

default-channels-implclj


double-array-typeclj


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.
raw docstring

float-array-typeclj


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.
raw docstring

int-array-typeclj


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.
raw docstring

keyword-to-byte-orderclj


long-array-typeclj


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.
raw 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.
raw 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.
raw 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.
raw docstring

short-array-typeclj


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.
raw 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.
raw docstring

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

× close