I'm not completely clear on what you are asking, but this sounds like a good use case for a NoSQL document store. If I were you, I'd be looking into things like CouchDB, MongoDB, Amazon S3 , etc.
CouchDB provides an HTTP interface via RESTful calls to your documents. So you could store your media in it, and you'd have a URL for each media element. There are Java libraries to support it, plus it's just REST with JSON, so it is really easy to get it working with Java. Personally, I use Jackson for JSON processing.
I'm not sure about a pure Java solution, perhaps JackRabbit? But it seems it may be overkill for your needs. It wouldn't be hard to roll your own. Perhaps use Jersey to implement REST, and then just store files on the filesystem. I guess it all depends on the scale you need.
Hope this helps.