The moose likes Java in General and the fly likes How to create my own file format using java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to create my own file format using java" Watch "How to create my own file format using java" New topic
Author

How to create my own file format using java

Venkat Sm
Greenhorn

Joined: Feb 07, 2012
Posts: 1
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?

Please Give some ideas....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

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.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 8428

All files are really just a bunch of bytes. the 'format' depends on how you interpret them.

So before you can create it 'in java', you first need to create it 'on paper' - i.e. define what your format will be.


Never ascribe to malice that which can be adequately explained by stupidity.
Pete Nelson
Ranch Hand

Joined: Aug 30, 2010
Posts: 144

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
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 339

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.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 3221

Venkat, please BeForthrightWhenCrossPostingToOtherSites
http://stackoverflow.com/questions/9175478/how-to-convert-pdf-to-my-own-file-format-using-java (closed as not a real question)
http://stackoverflow.com/questions/9173626/how-to-create-my-own-file-format-in-java (closed as not a real question)
http://stackoverflow.com/questions/9180763/how-to-create-my-own-file-format-like-azw-mobi-epub-etc-using-java (closed as exact duplicate)
http://stackoverflow.com/questions/9175185/what-is-needed-to-create-my-own-file-format-in-java (closed as not a real question)
http://www.daniweb.com/software-development/java/threads/410849


luck, db
There are no new questions, but there may be new answers.
 
 
subject: How to create my own file format using java
 
Threads others viewed
Clarification creating War file
resume
method not found in imported class - JCAPS6
How to remove prefix from target namespace
where to use jar files in a jsp project
MyEclipse, The Clear Choice