Sorry if this is a bit lazy of a question, but does anyone know of a clojure library that aids in doing the same thing this java file accomplishes, relating to building up byte arrays before writing them to DataOutputStreams: https://github.com/edouardswiac/ib-java/blob/master/src/main/java/com/ib/client/Builder.java Particularly these lines seem kind of low level: https://github.com/edouardswiac/ib-java/blob/master/src/main/java/com/ib/client/Builder.java#L77-L101 and I have a sense that there's some clojure library might accomplish the same thing but I'm not sure exactly which one.
@jjttjj Well, clj does have bit-and
, bit-shift-left
, etc
I’m not sure what sort of functionality you are looking for in a lib to “accomplish the same thing”. e.g. * The same thing as this project you linked or * the same as the Builder class (seems to only be a part of a larger feature) or * just this inner class that deals with byte buffers
Sorry I meant this whole builder class
including the ByteBuffer private class
I don’t understand enough of what it is accomplishing to have useful feedback there
I just got a sense that this "build up a byte array then write it to DataOutputStream" might be a sort of pattern that someone had come accross in clojure
gotcha thanks for the input though
An extension on ObjectOutput, perhaps for Java serialization or something?
I see
I think it's supposed to be something like a StringBuilder but that it builds up a byte array
but there is some sort of header in the byte array that must be emitted
but I haven’t used this
it may ease some of the byte fiddling
oh cool, thanks!