Package org.apache.sanselan.common.byteSources

Examples of org.apache.sanselan.common.byteSources.ByteSourceInputStream


     *            OutputStream to write the image to.
     */
    public void removeIPTC(InputStream src, OutputStream os)
            throws ImageReadException, IOException, ImageWriteException
    {
        ByteSource byteSource = new ByteSourceInputStream(src, null);
        removeIPTC(byteSource, os);
    }
View Full Code Here


     */
    public void writeIPTC(InputStream src, OutputStream os,
            PhotoshopApp13Data newData) throws ImageReadException, IOException,
            ImageWriteException
    {
        ByteSource byteSource = new ByteSourceInputStream(src, null);
        writeIPTC(byteSource, os, newData);
    }
View Full Code Here

     * @param  os  OutputStream to write the image to.
     */
    public void removeExifMetadata(InputStream src, OutputStream os)
            throws ImageReadException, IOException, ImageWriteException
    {
        ByteSource byteSource = new ByteSourceInputStream(src, null);
        removeExifMetadata(byteSource, os);
    }
View Full Code Here

     */
    public void updateExifMetadataLossless(InputStream src, OutputStream os,
            TiffOutputSet outputSet) throws ImageReadException, IOException,
            ImageWriteException
    {
        ByteSource byteSource = new ByteSourceInputStream(src, null);
        updateExifMetadataLossless(byteSource, os, outputSet);
    }
View Full Code Here

     */
    public void updateExifMetadataLossy(InputStream src, OutputStream os,
            TiffOutputSet outputSet) throws ImageReadException, IOException,
            ImageWriteException
    {
        ByteSource byteSource = new ByteSourceInputStream(src, null);
        updateExifMetadataLossy(byteSource, os, outputSet);
    }
View Full Code Here

          }
        }
      }
    };

    new JpegUtils().traverseJFIF(new ByteSourceInputStream(is, filename), visitor);
    return imageParams;
  }
View Full Code Here

         return;
       }

       // Content header checking is fast so this is fine to do for every response.
       ImageFormat imageFormat = Sanselan
           .guessFormat(new ByteSourceInputStream(response.getContentBytes(), uri.getPath()));

       if (imageFormat == ImageFormat.IMAGE_FORMAT_UNKNOWN) {
         enforceUnreadableImageRestrictions(uri, response);
         return;
       }
View Full Code Here

      String contentType = resp.getHeader("Content-Type");
      if (contentType == null || contentType.toLowerCase().startsWith("image/")) {
        // Unspecified or unknown image mime type.
        try {
          ImageFormat imageFormat = Sanselan
              .guessFormat(new ByteSourceInputStream(resp.getContentBytes(),
                  request.getUri().getPath()));
          if (imageFormat == ImageFormat.IMAGE_FORMAT_UNKNOWN) {
            if (LOG.isLoggable(Level.INFO)) {
              LOG.logp(Level.INFO, classname, "rewriteProxiedImage", MessageKeys.UNABLE_SANITIZE_UNKNOWN_IMG,new Object[] {request.getUri().toString()});
            }
View Full Code Here

          HttpResponse response = requestCxt.getHttpResp();
          // Content header checking is fast so this is fine to do for every
          // response.
          ImageFormat imageFormat = Sanselan.guessFormat(
              new ByteSourceInputStream(response.getResponse(), imgUri.getPath()));

          if (imageFormat == ImageFormat.IMAGE_FORMAT_UNKNOWN) {
             // skip this node
            continue;
          }
View Full Code Here

        return;
      }

      // Content header checking is fast so this is fine to do for every response.
      ImageFormat imageFormat = Sanselan
          .guessFormat(new ByteSourceInputStream(response.getContentBytes(), uri.getPath()));

      if (imageFormat == ImageFormat.IMAGE_FORMAT_UNKNOWN) {
        enforceUnreadableImageRestrictions(uri, response);
        return;
      }
View Full Code Here

TOP

Related Classes of org.apache.sanselan.common.byteSources.ByteSourceInputStream

Copyright © 2018 www.massapicom. 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.