• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
mou haj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically the buffered kind, i.e. ByteArrayInputStream or BufferedInputStream, from what I can ascertain.

Jules
 
Ashish Vegaraju
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

for that use this method

//boolean markSupported()//

good luck
Ashish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic