Resolved. I overlooked that OutputStream has void write(byte[] b, int off, int len) .
With write(byte[] ...) of OutputStream instead of write(char[] ...) of BufferedWritersends I can send the bytes that I want to send. Code: (require '[clojure.java.io :refer :all]) (with-open [s (java.net.Socket. "*ip.of.test.server*" *port_of_test_server *)] (let [^java.io.OutputStream os (.getOutputStream s) ^bytes obuf (byte-array (map #(byte (if (< % 128) % (- % 256))) [0 1 127 128 255]))] (.write os obuf 0 5) (.flush os))) sent [0x00, 0x01, 0x7f, 0x80, 0xff] to my test server. Thank you, Armando and all. Regards, Yoshinori Kohyama -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.