Examples of ImageSource


Examples of gistoolkit.server.mapservice.adminextender.images.ImageSource

        }
        if ((tempUCName.endsWith("JPEG"))||(tempUCName.endsWith("JPG"))){
            inResponse.setContentType("image/jpeg");
        }
       
        InputStream in = new ImageSource().getResource(tempName);
        if (in == null){
            // check on the file system
            File tempFile = new File(tempName);
            if (tempFile.exists()){
                in = new FileInputStream(tempFile);
View Full Code Here

Examples of gistoolkit.server.mapservice.clientextender.images.ImageSource

        }
        if ((tempUCName.endsWith("JPEG"))||(tempUCName.endsWith("JPG"))){
            inResponse.setContentType("image/jpeg");
        }
       
        InputStream in = new ImageSource().getResource(tempName);
        if (in == null){
            // check on the file system
            File tempFile = new File(tempName);
            if (tempFile.exists()){
                in = new FileInputStream(tempFile);
View Full Code Here

Examples of gistoolkit.server.mapservice.clientextender.images.ImageSource

    }
    /** Retrieve the client jar file from the images folder. */
    public void getJAR(Request inRequest, Response inResponse)throws Exception{
        inResponse.setContentType("application/octetstream");
        OutputStream out = inResponse.getOutputStream();
        InputStream in = new ImageSource().getResource("Client.jar");
        byte[] buff = new byte[1000];
        int length = in.read(buff);
        while (length != -1){
            out.write(buff,0,length);
            length = in.read(buff);
View Full Code Here

Examples of gistoolkit.server.mapservice.htmlclientextender.images.ImageSource

        }
        if ((tempUCName.endsWith("JPEG"))||(tempUCName.endsWith("JPG"))){
            inResponse.setContentType("image/jpeg");
        }
       
        InputStream in = new ImageSource().getResource(tempName);
        if (in == null){
            // check on the file system
            File tempFile = new File(tempName);
            if (tempFile.exists()){
                in = new FileInputStream(tempFile);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

     * @param src the Source object
     * @return the ImageInputStream
     */
    public static ImageInputStream needImageInputStream(Source src) {
        if (src instanceof ImageSource) {
            ImageSource isrc = (ImageSource)src;
            if (isrc.getImageInputStream() == null) {
                throw new IllegalArgumentException(
                        "ImageInputStream is null/cleared on ImageSource");
            }
            return isrc.getImageInputStream();
        } else {
            throw new IllegalArgumentException("Source must be an ImageSource");
        }
    }
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

     * accidental/unwanted use by a component further downstream.
     * @param src the Source object
     */
    public static void removeStreams(Source src) {
        if (src instanceof ImageSource) {
            ImageSource isrc = (ImageSource)src;
            isrc.setImageInputStream(null);
        } else if (src instanceof StreamSource) {
            StreamSource ssrc = (StreamSource)src;
            ssrc.setInputStream(null);
            ssrc.setReader(null);
        } else if (src instanceof SAXSource) {
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

            IOUtils.closeQuietly(streamSource.getInputStream());
            streamSource.setInputStream(null);
            IOUtils.closeQuietly(streamSource.getReader());
            streamSource.setReader(null);
        } else if (src instanceof ImageSource) {
            ImageSource imageSource = (ImageSource)src;
            if (imageSource.getImageInputStream() != null) {
                try {
                    imageSource.getImageInputStream().close();
                } catch (IOException ioe) {
                    //ignore
                }
                imageSource.setImageInputStream(null);
            }
        } else if (src instanceof SAXSource) {
            InputSource is = ((SAXSource)src).getInputSource();
            if (is != null) {
                IOUtils.closeQuietly(is.getByteStream());
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

     * @param src the Source object
     * @return the ImageInputStream
     */
    public static ImageInputStream needImageInputStream(Source src) {
        if (src instanceof ImageSource) {
            ImageSource isrc = (ImageSource)src;
            if (isrc.getImageInputStream() == null) {
                throw new IllegalArgumentException(
                        "ImageInputStream is null/cleared on ImageSource");
            }
            return isrc.getImageInputStream();
        } else {
            throw new IllegalArgumentException("Source must be an ImageSource");
        }
    }
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

     * accidental/unwanted use by a component further downstream.
     * @param src the Source object
     */
    public static void removeStreams(Source src) {
        if (src instanceof ImageSource) {
            ImageSource isrc = (ImageSource)src;
            isrc.setImageInputStream(null);
        } else if (src instanceof StreamSource) {
            StreamSource ssrc = (StreamSource)src;
            ssrc.setInputStream(null);
            ssrc.setReader(null);
        } else if (src instanceof SAXSource) {
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSource

            IOUtils.closeQuietly(streamSource.getInputStream());
            streamSource.setInputStream(null);
            IOUtils.closeQuietly(streamSource.getReader());
            streamSource.setReader(null);
        } else if (src instanceof ImageSource) {
            ImageSource imageSource = (ImageSource)src;
            if (imageSource.getImageInputStream() != null) {
                try {
                    imageSource.getImageInputStream().close();
                } catch (IOException ioe) {
                    //ignore
                }
                imageSource.setImageInputStream(null);
            }
        } else if (src instanceof SAXSource) {
            InputSource is = ((SAXSource)src).getInputSource();
            if (is != null) {
                IOUtils.closeQuietly(is.getByteStream());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.