• Post Reply Bookmark Topic Watch Topic
  • New Topic

read pasowrd protected zip file in java  RSS feed

 
charan sri
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

can anyone let me know is there any way to read a password protected zipfile in java.I have the password.

Thanks in advance
Charan
 
Renee Lee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure out a similar problem.

I need to run view a remote log file from java.
I was able to log on to the box manually and open the log file by giving username and password.
But how do I provide username and password in java when opening the remote file:
\\aRemoteWindowsBox\d$\aProject\logfile

.........
FileReader inputFileReader = new FileReader(src_file);
BufferedReader inputStream = new BufferedReader(inputFileReader);

while (( aLine = inputStream.readLine()) != null)
{ process each line
}

inputStream.close();

Thank you for any help!!
--Renee
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not that easy for good reason, it's to secure the file. However, there is a package to aid you in this, IPWorks Zip http://www.nsoftware.com/ipworks/zip/
 
Renee Lee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Carl!

The link you provided talks mainly about a tool, which says:
"IP*Works! Zip

Add advanced file and streaming compression to your applications. IP*Works! Zip is a suite of easy, fast, and effective components that enables developers to rapidly add compression and decompression functionality to any application.

IP*Works! Zip starting at $249 ...."

I'm more towards looking for a way in java to pass the username and password over to the remote box so that the java process could read a file on this remote box.

Without passing the username and password in java (servlet), I'm getting the following error when accessing a shared file on a remote box:

"Java.io.FileNotFoundException: //aRemoteBox/d$/aDir/aFile (Access is denied.)"

Does anyone happen to have some ideas on this?

Thank you in advance,
--Renee
 
Paul Clapham
Sheriff
Posts: 22505
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Renee Lee:
Thanks Carl!

The link you provided talks mainly about a tool, which says:
"IP*Works! Zip
That's because Carl was answering the question posted by charan sri. Your reply appears to be an unrelated question, which should really have been a separate thread.
 
Renee Lee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll open a new post. Thanks!
--Renee
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!