Java - file format as a folder - java

I'm developing a java library for use on Android devices and java desktop applications.
In this library, I want to pack several files in one file with a custom extension.
The only need I have at that extension is to add and delete files (text and images).
What would be the simplest way to implement this?
I'm trying with tar and zip. But in these formats I can not delete entries easily.
I know ZipFileSystem, but it depends on nio and Android does not have full support.
I want a solution that is purely java, and can run on android and java desktop applications.
I want a format that works as a folder.
Thank you.
Excuse my English.

Related

How to emulate an Android type file system in a Java desktop application?

I have had some experience programming in Java and a little with Java for Android. I haven't done much with Android but enough for me to gain respect for the standard file system within the project. I like how all the resources are contained separately in XML files instead of hard coded into the application.
My question is: Is there a way to emulate this same system when making a project designed to run as a desktop application?
I know I could just code it myself, including the XML files in the jar, set up a separate class to read them, and reference that class when using the resources, but is there a built in way to do this?
I think what you need is just a key-value pair system. JSON is quite enough to fulfill your requirements.
How to parse JSON in Java
I don't think so..
The xml files are compiled, in a certain way that its better to find another approach.
You don't want to write the android compiler from scratch.

read Dxf file with java

can we read with calculating object surface as example of a drawing autocad forms using java?
I found some package that can read and display the dxf file
I don't have experience with AutoCAD files and java, but per your comment regarding C#...You can use the AutoCAD .NET API with C# or VB.net. There is also the ObjectARX library for C++. These are shipped with AutoCAD and are typically used for building AutoCAD plugins.
If you don't have access to AutoCAD, or need to run your application outside of AutoCAD I'd suggest looking into Open Design Alliance. They have libraries for manipulating Autodesk files outside of the Autodesk suites.

Which tool/plug-in can be used to copy files from remote location in least possible time?

My need is to copy some of the zipped files from remote location to my machine and then unzip it in specific location. By which way it can be achieved in fastest way? Are there any open source tool already available for that? I know about Robocopy, but is there any other tool also, better than Robocopy?
I'm using windows xp operating system. I have to do this inside my eclipse application, so I need the tool or any plugin which I can easily incorporate in my eclipse application.
Thanks a lot in advance!!!
Related to adarshr's answer, you could use the Apache Commons IO or NET projects (see http://commons.apache.org/). Or if you want something with paid support you could use JScape. These are Java API's that allow you to do IO and FTP'ing. Then you could use either the java.util.zip classes for zipping/unzipping, or the Apache Compress project.
Any of these options gives you flexibility at the Java programming level.
You probably need an FTP client such as Filezilla.
For working with remote files from within eclipse, take a look at the RSE (Remote System Explorer) Plugin

Java library for opening PDF with text, images, & formatting?

I'm developing a software (mac & pc) for opening & annotating PDFs for presentations. I need help finding a Java library that can assist with opening an external PDF, that will not just open the text, but the images & formatting as well. Anyone have experience with this?
There's a library called iText that does most things you will need for PDF. I only know it because it was part of an application I modified, so I don't have anything to compare it against.
I did find some of its behavior non-intuitive, so you may want to look around still.
AFAIK iText is to generate and manipulate PDF files. If you want to open and view PDFs use http://pdfbox.apache.org/
Most Java libraries will let you access the low level objects. Your exact requirement is quite vague what exactly are you trying to do?

Java Media Framework on client side?

If I’m writing an applet that shows a video sequence (eg. streaming from a camera, or the applet itself is running the on the camera), do my clients need to download the Java Media Framework libraries inorder to see the sequence?
They need to install Java Media Framework on their computers, or you'll need to bundle the JMF together with your applet somehow.
If the applet makes use of the JMF libraries they need to be downloaded to the client machine (where the applet executes). However, JMF gets very little development from Sun (read none) and is pretty much legacy now (subjective).
Depending on how modern the camera is and what codecs it can output it may also be worth considering the video support in either javafx of flash.
Distributing the JMF.jar with your applet is sufficient.
Create a JAR ( Java DLL ) and put all the jar files from the install directory, JMF is 32-bit only, so the x86\java\JMF2.1.1e\lib is where it's usually located.
If you customized the customizer.jar you want that one too.
You can download it from a server like an applet and embed the applet inside and then run it. It's worked for me for 14+ years in Adult Pay sites.
Did you consider to use Java FX? This technology is dealing with this problem of downloading media libraries and so no. Of course. It is still in development. If to be first-adopter is option, it will be worth of considering this.

Categories