Can any one tell me how to create my own file format using java?
I have to create my own file format like Pdf,Doc etc..
What are the technical details should i collect for this?
Not a question about servlets. Hardly a question about Java either, but since you want to do it "with Java", let's move it to a Java programming forum.
That's probably less something a Servlet should worry about, and more something for a general java library (after all, if other users & other programs can't use your file format, it probably won't last for long).
As far as Java is concerned, I think you'd mainly want to know if the format would be for a character or binary data (or chunks of both). And if you're storing hierarchical data, I'd strongly consider XML as a starting point.
OCPJP
"In preparing for battle I have always found that plans are useless, but planning is indispensable."
-- Dwight D. Eisenhower
The best and easiest way is to look for and use APIs for each of the file types you want to create from your Java code. For instance Apache PDFBox, iTextPdf, Apache POI, Apache FOP, etc.