Which APIs are you using - I assume the standard Java APIs. You generally use the ContentService to deal with ContentData type properties as they encapsulate the information needed to access the content mimetype, size and the binary content itself. Take a look at the ContentService API docs. See something like the DownloadContentServlet source code for examples of processing those properties.
Thanks,
Kevin