On unix-like systems, you'd be able (only as root, most likely) to read the disk files /dev/{h,s}d*
and write whatever byte sequence you want to them, including byte sequences that represent a, say, ext3 file system.
I don't know of any ext3 libraries in Java, though, so you might have to write it yourself. Or a library for the file format you care about.
This is probably not what you want, though, but you can settle for it :-)