Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Developer
Posts: 39
Registered: ‎01-21-2014
My Device: Blackberry curve
My Carrier: 918547626119

Class to replace java.io.FileInputStream;

I'm writing a program to unzip a file but I'm getting a deprecated error for FileInput stream. Any suggestions on why this is coming or how I can overcome this. I'm using Zipme lib and 9900 simulator. This is my code 

 

try {
FileInputStream fin = new FileInputStream(_zipFile);
ZipInputStream zin = new ZipInputStream(fin);
ZipEntry ze = null;
while ((ze = zin.getNextEntry()) != null) {
//Log.v("Decompress", "Unzipping " + ze.getName());
if(ze.isDirectory()) {
_dirChecker(ze.getName());
} else {
FileOutputStream fout = new FileOutputStream(_location + ze.getName());
for (int c = zin.read(); c != -1; c = zin.read()) {
fout.write(c);
}
zin.closeEntry();
fout.close();
}