How can we retrieve each attachment from multiple attachments of a document

Hi

how can we retrieve each attachment from multiple attachments of a document and create documents for each attachment. which class will be use.

Regards

Sanjay