davmail.util
Class IOUtil

java.lang.Object
  extended by davmail.util.IOUtil

public final class IOUtil
extends Object

Input output functions.


Method Summary
static byte[] readFully(InputStream inputStream)
           
static BufferedImage resizeImage(BufferedImage inputImage, int max)
          Resize image to a max width or height image size.
static byte[] resizeImage(byte[] inputBytes, int max)
          Resize image bytes to a max width or height image size.
static void write(InputStream inputStream, OutputStream outputStream)
          Write all inputstream content to outputstream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(InputStream inputStream,
                         OutputStream outputStream)
                  throws IOException
Write all inputstream content to outputstream.

Parameters:
inputStream - input stream
outputStream - output stream
Throws:
IOException - on error

resizeImage

public static byte[] resizeImage(byte[] inputBytes,
                                 int max)
                          throws IOException
Resize image bytes to a max width or height image size.

Parameters:
inputBytes - input image bytes
max - max size
Returns:
scaled image bytes
Throws:
IOException - on error

resizeImage

public static BufferedImage resizeImage(BufferedImage inputImage,
                                        int max)
Resize image to a max width or height image size.

Parameters:
inputImage - input image
max - max size
Returns:
scaled image

readFully

public static byte[] readFully(InputStream inputStream)
                        throws IOException
Throws:
IOException


Copyright © 2001-2013 MickaĆ«l Guessant. All Rights Reserved.