• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
JulianInactive KennedyInactive
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Typically the buffered kind, i.e. ByteArrayInputStream or BufferedInputStream, from what I can ascertain.

Jules
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic