public boolean isEncodingAlpha() {
        return false;
    }

    /**
     * Set whether the encoder should encode alpha transparency (this is not 
     * supported for JPEG, so this method does nothing).
     *
     * @param encodingAlpha  ignored.
     */
    public void setEncodingAlpha(boolean encodingAlpha) {
        //  No op
    }

    /**
     * Encodes an image in JPEG format.
     *
     * @param bufferedImage  the image to be encoded (<code>null</code> not 
     *     permitted).
     * 
     * @return The byte[] that is the encoded image.
     * 
     * @throws IOException if there is an I/O problem.
     * @throws NullPointerException if <code>bufferedImage</code> is 
     *     <code>null</code>.
     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        encode(bufferedImage, outputStream);
        return outputStream.toByteArray();