File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes java.io.IOException: mark/reset not supported --WHATS THAT???? need u experts help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.io.IOException: mark/reset not supported --WHATS THAT???? need u experts help" Watch "java.io.IOException: mark/reset not supported --WHATS THAT???? need u experts help" New topic
Author

java.io.IOException: mark/reset not supported --WHATS THAT???? need u experts help

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
Hi All,

I trying to decrypt and read an information (using a GnuPGP public key) and Cryptix and Im getting this exception..
java.io.IOException: mark/reset not supported

WHat the hell does it mean? when do u get these kinda exception.. im seeing this for the first time

----------------------------------
java.io.IOException: mark/reset not supported
at java.io.InputStream.reset(InputStream.java:327)
at cryptix.openpgp.provider.PGPKeyBundleFactory.helper(PGPKeyBundleFacto
ry.java:96)
at cryptix.openpgp.provider.PGPKeyBundleFactory.engineGenerateKeyBundle(
PGPKeyBundleFactory.java:281)
at cryptix.pki.KeyBundleFactory.generateKeyBundle(KeyBundleFactory.java:
154)..............................................

Any idea???

TIA
Mou
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
What sort of InputStream are you using? You need one that supports the mark() and reset() methods. Sorry if that's stating the obvious but that appears to be the problem.

Jules
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Typically the buffered kind, i.e. ByteArrayInputStream or BufferedInputStream, from what I can ascertain.

Jules
Ashish Vegaraju
Ranch Hand

Joined: Aug 19, 2004
Posts: 47
Hi,

void mark(int readlimit)
this method "Marks" the current position in this input stream.

void reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.

These two methods r of FilterInputStream class....

well i dun know much abt PGp keys(Whatever) but it seems u want to read from a file.

this piece of code will work.
//InputStream stream=new FileInputStream(fileName);//
//FilterInputStream fstream=new FilterInputStream (stream);
//then use the "mark" and "reset" methods.//

hope this'll help

the error is probably due to selection of wrong inputstream.

If this doesnt help....feel free to ask.

Ashish
Ashish Vegaraju
Ranch Hand

Joined: Aug 19, 2004
Posts: 47
Hi,

check first ur inputstream support mark and reset method or not...

for that use this method

//boolean markSupported()//

good luck
Ashish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.io.IOException: mark/reset not supported --WHATS THAT???? need u experts help
 
Similar Threads
Help in Java Sound!!!
FileConnection
mark/reset not supported on getResourceAsStream
Jmf problem with webcam and microphone
mark() and reset()