Package java.util.zip

Examples of java.util.zip.DataFormatException


        decompresser.setInput(in, inPos, inLen);
        decompresser.finished();
        try {
            int len = decompresser.inflate(out, outPos, outLen);
            if (len != outLen) {
                throw new DataFormatException(len + " " + outLen);
            }
        } catch (DataFormatException e) {
            throw DbException.get(ErrorCode.COMPRESSION_ERROR, e);
        }
        decompresser.end();
View Full Code Here


        position += block.remaining(position);
        pin(pack, position);
      } else if (inf.finished())
        return dstoff;
      else
        throw new DataFormatException();
    }
  }
View Full Code Here

          pin(pack, position);
          position += window.setInput(position, inf);
        } else if (inf.finished())
          return dstoff;
        else
          throw new DataFormatException();
      }
      dstoff += n;
    } while (dstoff < dstbuf.length);
    return dstoff;
  }
View Full Code Here

        position += block.remaining(position);
        pin(pack, position);
      } else if (inf.finished())
        return dstoff;
      else
        throw new DataFormatException();
    }
  }
View Full Code Here

            inputLen = inflater.inflate(input);
            if (!inflater.finished()) {
               
                if (inputLen == 0) {
                    if (inflater.needsInput()) {
                        throw new DataFormatException("Inflater can not inflate all the token bytes");
                    } else {
                        break;
                    }
                }
               
View Full Code Here

  public void testMultiCatch() {
    System.out.println("*** Exception Multi Catch ***");
    int x = Calendar.getInstance().get(Calendar.MINUTE);
    try {
      if (x <= 30) {
        throw new DataFormatException("Case n�1");
      }
      if (x > 30) {
        throw new TimeoutException("Case n�2");
      }
    }
View Full Code Here

    System.out.println("*** More Precise Rethrow ***");
    int x = Calendar.getInstance().get(Calendar.MINUTE);
    try {
      if (x <= 30) {
        this.thrownRule.expect(DataFormatException.class);
        throw new DataFormatException("Case n�1");
      }
      if (x > 30) {
        this.thrownRule.expect(TimeoutException.class);
        throw new TimeoutException("Case n�2");
      }
View Full Code Here

            inputLen = inflater.inflate(input);
            if (!inflater.finished()) {
               
                if (inputLen == 0) {
                    if (inflater.needsInput()) {
                        throw new DataFormatException("Inflater can not inflate all the token bytes");
                    } else {
                        break;
                    }
                }
               
View Full Code Here

          pin(pack, position);
          position += window.setInput(position, inf);
        } else if (inf.finished())
          return dstoff;
        else
          throw new DataFormatException();
      }
      dstoff += n;
    } while (dstoff < dstbuf.length);
    return dstoff;
  }
View Full Code Here

        return dstoff;
      if (inf.needsInput()) {
        pin(pack, position);
        position += block.setInput(position, inf);
      } else if (n == 0)
        throw new DataFormatException();
    }
  }
View Full Code Here

TOP

Related Classes of java.util.zip.DataFormatException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.