Can anyone tell me about how to create my own format like .azw(kindle device format),.mobi,.epub etc..Is it possible to create it using java? if yes then what are the steps to do that? I am doing project for e-publishing company they need one own proprietary format like the above formats for their company. To accomplish this task, what are the things i have to learn or what details i have collect to do this?I planned to do this in java.Is it right platform to do that?

please help me and share your ideas..

Thanks in advance..

AFAIK there is no magic in having a java program write out a file with any extension or contents.
The magic is getting a unique value for the extension and having the OS recognize it as belonging to your application. For example 12 years ago I used the RSS extension for my slideshow control file.
On MS windows, the connection between an extension and an application is via the registry.
On linux there is a table somewhere that needs to have an entry.

Edited 4 Years Ago by NormR1: n/a

Can anyone tell me about how to create my own format like .azw(kindle device format),.mobi,.epub etc..Is it possible to create it using java? if yes then what are the steps to do that? I am doing project for e-publishing company they need one own proprietary format like the above formats for their company. To accomplish this task, what are the things i have to learn or what details i have collect to do this?I planned to do this in java.Is it right platform to do that?

please help me and share your ideas..

Thanks in advance..

Hmm would this not depend on the type of OS such as Windows,Linix etc? Because I don't think java has an inbuilt file extension api. In windows one might use command prompt and regedit for example to make our application open a certain type of file ie *.cg

Edited 4 Years Ago by DavidKroukamp: n/a

NormR1 is right, just creating a file with a certain extension can be done easily like

File myFile = new File("testfile.qrr");
boolean created = myFile.createNewFile();

but it would be nothing more than a txt file with a different extension. it'll take more than just to change the extension to make the data be stored or handled differently.

Creating a file with your own format, and your own extension is easy.
In fact... You already know how to do that.
If the company you're dealing with has a proprietary format, only that company can tell you what the specification is.
If you're trying to output a file in a specific format, with a specific (usable) extension, that's another story.
If it is a "generic" format (which that company uses), you'll have to do a search for the format specification for the extension you wish to create.

Edited 4 Years Ago by hfx642: n/a

Creating a file with your own format, and your own extension is easy.
In fact... You already know how to do that.
If the company you're dealing with has a proprietary format, only that company can tell you what the specification is.
If you're trying to output a file in a specific format, with a specific (usable) extension, that's another story.
If it is a "generic" format (which that company uses), you'll have to do a search for the format specification for the extension you wish to create.

Thanks for your reply

i think it would be better if you have special algorithms to encrypt and decrypt the content of those files . So, it makes more confidential. Those files can not read by other applications such as notepad etc.

that doesn't really matter here.
when the contents is decrypted, the nature of the file itself doesn't really change. if it was created as a .txt with alternative file-extension, whether you encrypt the contents or not, the OS would still regard it as a txt file.

though a year later! nonetheless
I am trying to implement the same but the idea here is a different file format for the ebook. and we will create an android or iphone app to read the format. sole purpose is that we can prevent sharing of this file. is this possible. is it possible in php to read a .pdf file and make it our own format?

thanks in advance

Nice try James, but that would be only me replying :P

To create mobi format you can use official Amazon Generator for epub have look here or just Google for Java Epub library.

All the resources gathered through Google search xD

This article has been dead for over six months. Start a new discussion instead.