Skip to content

File-to-file transfer fails #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lynaghk opened this issue Jan 22, 2014 · 0 comments
Closed

File-to-file transfer fails #12

lynaghk opened this issue Jan 22, 2014 · 0 comments

Comments

@lynaghk
Copy link

lynaghk commented Jan 22, 2014

This is with

                 [byte-transforms "0.1.1"
                  :exclusions [byte-streams]]
                 [byte-streams "0.1.7"]

Trying to copy from one file to another fails:

(bs/transfer (File. "test/fixture/kittensB/kitten1.jpg")
             (File/createTempFile "difftron" "image-diff"))

yields

sun.nio.ch.FileChannelImpl cannot be cast to java.lang.Number
  [Thrown class java.lang.ClassCastException]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0:        byte_streams.clj:699 byte-streams/eval4829[fn]
  1:        byte_streams.clj:425 byte-streams/this[fn]
  2:        byte_streams.clj:465 byte-streams/transfer
  3:        byte_streams.clj:460 byte-streams/transfer
  4: form-init6519885573008950383.clj:1 com.keminglabs.difftron.image-diff/eval11751

However, converting first to a byte-buffer works fine:

(bs/transfer (bs/to-byte-buffer (File. "test/fixture/kittensB/kitten1.jpg"))
             (File. "foo.jpg"))
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants