Skip to content

Instantly share code, notes, and snippets.

@davidsantiago
Created December 28, 2009 08:44
Show Gist options
  • Save davidsantiago/264592 to your computer and use it in GitHub Desktop.
Save davidsantiago/264592 to your computer and use it in GitHub Desktop.
(defprotocol PRandomAccessFile
""
(close [obj] "")
(position ([obj] [obj newpos]) ""))
(deftype RandomAccessBufferedFile
[#^java.nio.channels.FileChannel channel
#^java.nio.ByteBuffer buffer
#^long bufstart]
PRandomAccessFile
(close [] (.close channel))
(position ([] (.position channel))
([newpos] (.position channel newpos))))
Results in:
Unknown location:
error: java.lang.IllegalArgumentException: params must be Symbols (rabfile.clj:15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment