Allow java.io.OutputStream to be proxied, for kaocha
This commit is contained in:
parent
91413c2803
commit
a5318ea289
1 changed files with 12 additions and 0 deletions
|
|
@ -100,6 +100,18 @@
|
||||||
(write
|
(write
|
||||||
([b] ((method-or-bust methods 'write) this b))
|
([b] ((method-or-bust methods 'write) this b))
|
||||||
([b off len] ((method-or-bust methods 'write) this b off len))))
|
([b off len] ((method-or-bust methods 'write) this b off len))))
|
||||||
|
|
||||||
|
["java.io.OutputStream" #{}]
|
||||||
|
(proxy [java.io.PipedOutputStream] []
|
||||||
|
(close [] (if-let [m (get methods 'close)]
|
||||||
|
(m this)
|
||||||
|
(proxy-super close)))
|
||||||
|
(flush [] (if-let [m (get methods 'flush)]
|
||||||
|
(m this)
|
||||||
|
(proxy-super flush)))
|
||||||
|
(write
|
||||||
|
([b] ((method-or-bust methods 'write) this b))
|
||||||
|
([b off len] ((method-or-bust methods 'write) this b off len))))
|
||||||
, ;; keep this for merge friendliness
|
, ;; keep this for merge friendliness
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue