I'm currently writing a javax-usb (JSR-80) implementation using libusb 0.1 as a backend. I need to test the bulk transfer functionality and my guess is that the easiest way to do this is to communicate with a USB mass storage device like a USB flash drive. Unfortunately I have no idea how these devices are working. I guess there is some kind of protocol and I have to send some USB control requests before I can initiate a transfer on the bulk endpoints.
I'm not interested in writing a full USB mass storage driver or something like that so even file system stuff doesn't matter. My only purpose is to transfer some data via some bulk endpoint so I can compare my implementation with the reference implementation.
What I need is some example code (Language doesn't matter and most likely it even doesn't matter if it uses libusb or something different) or a specification of USB mass storage which is easy to understand for programmers (I'm no hardware specialist). I already searched the web but haven't found anything useful so far.