public static String[] getDecoderNames(SeekableStream src) {
        if (!src.canSeekBackwards() && !src.markSupported()) {
            throw new IllegalArgumentException(JaiI18N.getString("ImageCodec2"));
        }

        Enumeration enumeration = codecs.elements();
        Vector nameVec = new Vector();

        String opName = null;
        while (enumeration.hasMoreElements()) {
            ImageCodec codec = (ImageCodec)enumeration.nextElement();

            int bytesNeeded = codec.getNumHeaderBytes();
            if ((bytesNeeded == 0) && !src.canSeekBackwards()) {
                continue;
            }

            try {
                if (bytesNeeded > 0) {
                    src.mark(bytesNeeded);
                    byte[] header = new byte[bytesNeeded];
                    src.readFully(header);
                    src.reset();

                    if (codec.isFormatRecognized(header)) {
                        nameVec.add(codec.getFormatName());
                    }
                } else {
                    long pointer = src.getFilePointer();
                    src.seek(0L);
                    if (codec.isFormatRecognized(src)) {
                        nameVec.add(codec.getFormatName());
                    }
                    src.seek(pointer);
                }
            } catch (IOException e) {
                ImagingListenerProxy.errorOccurred(JaiI18N.getString("ImageCodec3"),
                                       e, ImageCodec.class, false);
//                e.printStackTrace();
            }
        }

        return vectorToStrings(nameVec);
    }