(->utf8 s)
Positional factory function for class fress.api.utf8.
Positional factory function for class fress.api.utf8.
(begin-closed-list writer)
Begin writing a fressianed list. To end the list, call end-list. Used to write sequential data whose size is not known in advance.
Begin writing a fressianed list. To end the list, call end-list. Used to write sequential data whose size is not known in advance.
(begin-open-list writer)
Writes fressian code to begin an open list. An open list can be terminated either by a call to end-list, or by simply closing the stream. Used to write sequential data whose size is not known in advance, in contexts where stream failure can safely be interpreted as end of list.
Writes fressian code to begin an open list. An open list can be terminated either by a call to end-list, or by simply closing the stream. Used to write sequential data whose size is not known in advance, in contexts where stream failure can safely be interpreted as end of list.
(create-reader in & opts)
Create a fressian reader targeting in.
Create a fressian reader targeting in. - :handlers is just a map of tag->fn merged with default read handlers - :checksum? {boolean} :: maintain a checksum for each byte read, validated when footer received. throws when fails. If no footer, has no effect - :name->map-ctor map of record names to map->Record constructors at runtime {'string-name' map->some-record} - cljs allows reading from :offset
(create-writer out & opts)
Create a fressian writer targeting out.
Create a fressian writer targeting out. - :handlers is just a map of {type {'tag' write-fn}} merged with default write handlers - :record->name (cljs only) map of record ctor to string-name (the string version of the record's fully resolved symbol)
(end-list writer)
Ends a list begun with begin-closed-list.
Ends a list begun with begin-closed-list.
(field-caching-writer cache-pred)
Returns a record writer that caches values for keys matching cache-pred, which is typically specified as a set, e.g. (field-caching-writer #{:color})
Returns a record writer that caches values for keys matching cache-pred, which is typically specified as a set, e.g. (field-caching-writer #{:color})
(read readable & options)
Convenience method for reading a single fressian object. Takes same options as create-reader
Convenience method for reading a single fressian object. Takes same options as create-reader
(read-all in & options)
like read-batch but accepts readables in addition to FressianReaders
like read-batch but accepts readables in addition to FressianReaders
(read-batch fin)
Read a fressian reader fully (until eof), returning a (possibly empty) vector of results.
Read a fressian reader fully (until eof), returning a (possibly empty) vector of results.
(read-handlers)
(read-handlers user-handlers)
merge in user handlers with default-handlers, wrap for fressian lookup
merge in user handlers with default-handlers, wrap for fressian lookup
(read-object rdr)
Read a single object from a fressian reader.
Read a single object from a fressian reader.
(reset-caches writer)
write a signal to the reader to forget established cache codes
write a signal to the reader to forget established cache codes
(tag o)
Returns the tag if object is a tagged-object, else nil.
Returns the tag if object is a tagged-object, else nil.
(tagged-object? o)
Returns true if o is a tagged object, which will occur when the reader does not recognized a specific type. Use tag and tagged-value to access the contents of a tagged-object.
Returns true if o is a tagged object, which will occur when the reader does not recognized a specific type. Use tag and tagged-value to access the contents of a tagged-object.
(tagged-value o)
Returns the value (an Object array) wrapped by obj, or nil if obj is not a tagged object.
Returns the value (an Object array) wrapped by obj, or nil if obj is not a tagged object.
(utf8-reader rdr tag _)
cant modify fressian.impl.Codes so using code from client will fail JVM readers must use "utf8" tag.
cant modify fressian.impl.Codes so using code from client will fail JVM readers must use "utf8" tag.
(write obj & options)
Convenience method for writing a single object. Returns a byte buffer. Options are the same as for create-reader, with one additional option :footer? {bool}, if specified will write a fressian footer after writing the object.
Convenience method for writing a single object. Returns a byte buffer. Options are the same as for create-reader, with one additional option :footer? {bool}, if specified will write a fressian footer after writing the object.
(write-footer writer)
use to seal off a writer with a final byte count & checksum for verification by a reader. Induces EOF
use to seal off a writer with a final byte count & checksum for verification by a reader. Induces EOF
(write-handlers)
(write-handlers user-handlers)
merge in user handlers with default-handlers, wrap for fressian lookup
merge in user handlers with default-handlers, wrap for fressian lookup
(write-object writer o)
(write-object writer o cache?)
Write a single object to a fressian writer.
Write a single object to a fressian writer.
(write-tag writer tag field-count)
for use in custom write handlers
for use in custom write handlers
(write-utf8 writer s)
(write-utf8 writer s cache?)
write a string as raw utf-8 bytes
write a string as raw utf-8 bytes
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close