Deflater and IBM JRE

Discussion in 'Java' started by Parker Thompson, Jul 1, 2003.

  1. Hello,

    I am having a bizarre problem that I'm hoping someone has an answer for.

    I have been developing using the Sun JRE, but recently switched to the IBM
    JRE for performance reasons. Unfortunately, there is something that
    causes the java.util.zip.Deflater class to throw an exception in
    Deflater.reset() consistantly using the latter setup.

    It probably does not matter, but in this case Deflater is being called by
    GZIPOutputStream, and throws the exception each time it is called.

    Thanks for any help you can provide,

    pt.
    Parker Thompson, Jul 1, 2003
    #1
    1. Advertising

  2. FYI,

    This problem occurs because of an implementation difference between sun
    and ibm's GZIPOutputStream classes. IBM (looks like for performance
    reasons) calls the deflater's end method as part of
    GZIPOutputStream.finish().

    In effect, this means you cannot write multiple compressed records to a
    single stream without doing some mojo on the side to make it all work.

    IBM, if you're listening, this is dumb. It might be acceptable if the
    classe's write methods were protected (and finish, which calls them, could
    be overridden), but as-is this makes this class inflexible, and in my case
    unusable.

    pt.

    In our last episode Parker Thompson exclaimed:

    :Hello,
    :
    :I am having a bizarre problem that I'm hoping someone has an answer for.
    :
    :I have been developing using the Sun JRE, but recently switched to the IBM
    :JRE for performance reasons. Unfortunately, there is something that
    :causes the java.util.zip.Deflater class to throw an exception in
    :Deflater.reset() consistantly using the latter setup.
    :
    :It probably does not matter, but in this case Deflater is being called by
    :GZIPOutputStream, and throws the exception each time it is called.
    :
    :Thanks for any help you can provide,
    :
    :pt.
    :
    :
    Parker Thompson, Jul 1, 2003
    #2
    1. Advertising

  3. Parker Thompson

    Harald Hein Guest

    "Parker Thompson" wrote:

    > It probably does not matter, but in this case Deflater is being
    > called by GZIPOutputStream, and throws the exception each time it
    > is called.


    Please come back when you are willing to show us the exception and the
    code causing it.

    HH
    Harald Hein, Jul 1, 2003
    #3
  4. Hi,
    I am sorry, but I have no answer to your question. But I have been looking
    for the IBM JDK and could not find it. Is it free, and if so, where could I
    find it?
    Thank you in advance,
    Xavier Tarrago

    "Parker Thompson" <> a écrit dans le message news:
    ...
    > Hello,
    >
    > I am having a bizarre problem that I'm hoping someone has an answer for.
    >
    > I have been developing using the Sun JRE, but recently switched to the IBM
    > JRE for performance reasons. Unfortunately, there is something that
    > causes the java.util.zip.Deflater class to throw an exception in
    > Deflater.reset() consistantly using the latter setup.
    >
    > It probably does not matter, but in this case Deflater is being called by
    > GZIPOutputStream, and throws the exception each time it is called.
    >
    > Thanks for any help you can provide,
    >
    > pt.
    >
    Xavier Tarrago, Jul 2, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. NOBODY
    Replies:
    2
    Views:
    791
    Thomas Weidenfeller
    Oct 17, 2003
  2. Ian R. Govett
    Replies:
    0
    Views:
    1,530
    Ian R. Govett
    Oct 20, 2003
  3. Dr. Carsten Leue

    Deflater.setDictionary

    Dr. Carsten Leue, Jan 12, 2004, in forum: Java
    Replies:
    1
    Views:
    1,451
    Chris Uppal
    Jan 12, 2004
  4. Replies:
    1
    Views:
    4,949
  5. Jochen Brenzlinger
    Replies:
    5
    Views:
    902
    Roedy Green
    Sep 2, 2011
Loading...

Share This Page