@Test public void testDecodeQualfication_Stream_success() { final String line = EnviConstants.FIRST_LINE + "dklfj\n234j\nsdf\tsdf\tsdaf\n"; final ByteArrayInputStream bais = new ByteArrayInputStream(line.getBytes()); final ImageInputStream stReader = new MemoryCacheImageInputStream(bais); assertEquals(DecodeQualification.SUITABLE, readerPlugIn.getDecodeQualification(stReader)); }
@Override public DecodeQualification getDecodeQualification(Object input) { if (input instanceof ImageInputStream) { return checkDecodeQualificationOnStream((ImageInputStream) input); } else if(input != null){ return checkDecodeQualificationOnFile(new File(input.toString())); } return DecodeQualification.UNABLE; }
EnviProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (input instanceof ImageInputStream) { return checkDecodeQualificationOnStream((ImageInputStream) input); } else if(input != null){ return checkDecodeQualificationOnFile(new File(input.toString())); } return DecodeQualification.UNABLE; } }
EnviProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (input instanceof ImageInputStream) { return checkDecodeQualificationOnStream((ImageInputStream) input); } else if(input != null){ return checkDecodeQualificationOnFile(new File(input.toString())); } return DecodeQualification.UNABLE; }  }
EnviProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (input instanceof ImageInputStream) { return checkDecodeQualificationOnStream((ImageInputStream) input); } else if(input != null){ return checkDecodeQualificationOnFile(new File(input.toString())); } return DecodeQualification.UNABLE; }  @Override DecodeQualification getDecodeQualification(Object input); @Override String[] getFormatNames(); @Override ProductReader createReaderInstance(); @Override String[] getDefaultFileExtensions(); @Override Class[] getInputTypes(); @Override String getDescription(Locale locale); @Override BeamFileFilter getProductFileFilter(); }
EnviProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (input instanceof ImageInputStream) { return checkDecodeQualificationOnStream((ImageInputStream) input); } else if(input != null){ return checkDecodeQualificationOnFile(new File(input.toString())); } return DecodeQualification.UNABLE; }  @Override DecodeQualification getDecodeQualification(Object input); @Override String[] getFormatNames(); @Override ProductReader createReaderInstance(); @Override String[] getDefaultFileExtensions(); @Override Class[] getInputTypes(); @Override String getDescription(Locale locale); @Override BeamFileFilter getProductFileFilter();  }