1. /*
  2. * @(#)InputStreamAdapter.java 1.11 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.imageio.plugins.common;
  8. import java.io.IOException;
  9. import java.io.InputStream;
  10. import javax.imageio.stream.ImageInputStream;
  11. /**
  12. * @version 0.5
  13. */
  14. public class InputStreamAdapter extends InputStream {
  15. ImageInputStream stream;
  16. public InputStreamAdapter(ImageInputStream stream) {
  17. super();
  18. this.stream = stream;
  19. }
  20. public int read() throws IOException {
  21. return stream.read();
  22. }
  23. public int read(byte b[], int off, int len) throws IOException {
  24. return stream.read(b, off, len);
  25. }
  26. }