This is how I did it. Once you finish downloading the zip fie from a url and you get a byte[] array out of it, simply pass it to a ByteArrayInputStream and pass that input stream to a ZipInputStream.

Check out the code:

In a zip file, every file or folder is represented by a ZipEntry. To browse through the zip file’s contents, loop the ZipInputStream and call getNextEntry() which returns a ZipEntry object.

To get the input stream of the file, just use the same ZipInputStream object. The developers did a slick job of designing this class.

Check out the code:

What the code does is that when getNextEntry() is called, it will go to the first file (or folder) in the list. The code assumes that there is only one file in the zip file and it reads the content of the file without having to save it.

You have to add code such as doing a check if the ZipEntry is a file or folder in case you have different file types in your zip file.


younity is an easy and free app that enables your computer to work like a home media server, giving you access to all your media files on your computer from your iPhone or iPad. You do not need to sync your files in order to have the latest photos, videos or files whatsoever.

Your computer itself acts as your storage repository and with the younity app, you will be able to access your files remotely. This means you need an Internet connection though to be able to access the files in real time.

younity

With younity, all files are kept secure and private on your own computers. Like how? younity just creates a connection to let users access their remotely. This means that you have access to all of your files without taking up any space on your iPhone or iPad.

You can connect multiple computers and younity will organize all of your files across all of your connected computers into a single, easy to browse menu. Pretty slick, right? One does not have to be technically inclined in order to make this work.

The younity app handles organization and other functionalities behind the scenes. Users only need to access their files which is what the purpose of the younity is in the first place.

Your friends can also share your files to friends and family through the app.

Download younity for FREE at: www.getyounity.com

There is no way to detect when a user selects files from an Input Type File form element in Angular JS. So we will have to do it the old fashion way.

Rather than binding, we can directly make use of the input element’s onchange event.

And in our Javascript file where your controller is located, add this function:

That’s it!

Related Posts Plugin for WordPress, Blogger...