Code example for ImageTypeSpecifier

        csm = rasterHandler.getSampleModel();
        ccmdl = PlanarImage.createColorModel(csm);
        final List<ImageTypeSpecifier> l = new ArrayList<ImageTypeSpecifier>();
        if (imageType == null) {
            imageType = new ImageTypeSpecifier(ccmdl, csm);
        return l.iterator();
    public IIOMetadata getStreamMetadata() throws IOException {
        // grass raster data do not support stream metadata. 
        return null; 
    public IIOMetadata getImageMetadata( final int imageIndex ) throws IOException {
        if (metadata == null)
            metadata = new GrassBinaryImageMetadata(this.rasterHandler);
Connect your IDE to all the code out there  Get Codota for Java