[英]How to read more then 4096 symbols from terminal in clojure/java?
This code takes 2500 numbers from one line in clojure. 此代码从Clojure的一行中获取2500个数字。
(import 'java.util.Scanner)
(let [s (new Scanner *in*)]
(for [i (range 2500)] (.nextInt s)))
But clojure takes only 4096 symbols. 但是clojure只需要4096个符号。
I tried change scanner to buffer, but it doesn't work. 我尝试将更改扫描程序缓冲,但无法正常工作。
(import 'java.io.BufferReader)
(def r (new BufferedReader *in*))
(.read r)
It takes only 4096 symbols. 它只需要4096个符号。
How to read more than 4096 symbols from on line from STDIN? 如何从STDIN在线读取超过4096个符号?
In addition to the above, here are some other answers that may help: 除了上述内容以外,这里还有一些其他答案可能会有所帮助:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.