org.richfaces.resource

## Class Java2DUserResourceWrapperImpl

- java.lang.Object
- - javax.faces.application.Resource
  - - org.richfaces.resource.AbstractBaseResource
    - - org.richfaces.resource.AbstractCacheableResource
      - - org.richfaces.resource.BaseResourceWrapper<Java2DUserResource>
        - - org.richfaces.resource.Java2DUserResourceWrapperImpl

- All Implemented Interfaces:
    javax.faces.component.StateHolder, javax.faces.FacesWrapper<Java2DUserResource>, CacheableResource, VersionedResource
  Direct Known Subclasses:
    Java2DAnimatedUserResourceWrapperImpl

      public class Java2DUserResourceWrapperImpl
      extends BaseResourceWrapper<Java2DUserResource>

  Author:
    Nick Belaevski

- - ### Field Summary

    - ### Fields inherited from class org.richfaces.resource.AbstractBaseResource

      `URL_PROTOCOL`

    - ### Fields inherited from class javax.faces.application.Resource

      `COMPONENT_RESOURCE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Java2DUserResourceWrapperImpl(Java2DUserResource resourceObject, boolean cacheable, boolean versioned)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Graphics2D` | `createGraphics(BufferedImage image)`
    `protected Integer` | `decodeColor(String value)`
    `protected Integer` | `getColorValueParameter(javax.faces.context.FacesContext context, String name, boolean useDefault)`
    `String` | `getContentType()`
    `protected Integer` | `getHeight(javax.faces.context.FacesContext context, String heightParamName)`
    `InputStream` | `getInputStream()`
    `protected Date` | `getLastModified(javax.faces.context.FacesContext context)` TODO optimize/review?
    `protected String` | `getValueParameter(javax.faces.context.FacesContext context, String name)`
    `protected Map<String,String>` | `getWrappedResourceResponseHeaders()`
    `protected void` | `paintAndWrite(ImageOutputStream outputStream)`
    `protected void` | `write(BufferedImage image, String formatName, ImageOutputStream imageOutputStream)`

    - ### Methods inherited from class org.richfaces.resource.BaseResourceWrapper

      `getEntityTag, getExpires, getResponseHeaders, getTimeToLive, getVersion, getWrapped, isCacheable, isTransient, restoreState, saveState, setTransient`

    - ### Methods inherited from class org.richfaces.resource.AbstractCacheableResource

      `addCacheControlResponseHeaders, isMatchesEntityTag, isMatchesEntityTag, isMatchesLastModified, isMatchesLastModified, setCacheable, userAgentNeedsUpdate`

    - ### Methods inherited from class org.richfaces.resource.AbstractBaseResource

      `addNoCacheResponseHeaders, getClassLoader, getContentLength, getRequestPath, getURL`

    - ### Methods inherited from class javax.faces.application.Resource

      `getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Java2DUserResourceWrapperImpl

          public Java2DUserResourceWrapperImpl(Java2DUserResource resourceObject,
                                               boolean cacheable,
                                               boolean versioned)

  - ### Method Detail

    - #### getInputStream

          public InputStream getInputStream()
                                     throws IOException

      Specified by:
        `getInputStream` in class `javax.faces.application.Resource`
      Throws:
        `IOException`

    - #### write

          protected void write(BufferedImage image,
                               String formatName,
                               ImageOutputStream imageOutputStream)
                        throws IOException

      Throws:
        `IOException`

    - #### getContentType

          public String getContentType()

      Overrides:
        `getContentType` in class `javax.faces.application.Resource`

    - #### getValueParameter

          protected String getValueParameter(javax.faces.context.FacesContext context,
                                             String name)

    - #### getColorValueParameter

          protected Integer getColorValueParameter(javax.faces.context.FacesContext context,
                                                   String name,
                                                   boolean useDefault)

    - #### getHeight

          protected Integer getHeight(javax.faces.context.FacesContext context,
                                      String heightParamName)

    - #### decodeColor

          protected Integer decodeColor(String value)

    - #### getWrappedResourceResponseHeaders

          protected Map<String,String> getWrappedResourceResponseHeaders()

      Specified by:
        `getWrappedResourceResponseHeaders` in class `BaseResourceWrapper<Java2DUserResource>`

    - #### getLastModified

          protected Date getLastModified(javax.faces.context.FacesContext context)

      Description copied from class: `AbstractBaseResource`
      TODO optimize/review?
      Overrides:
        `getLastModified` in class `AbstractBaseResource`
      Returns:
        Returns the lastModified.

    - #### paintAndWrite

          protected void paintAndWrite(ImageOutputStream outputStream)
                                throws IOException

      Throws:
        `IOException`

    - #### createGraphics

          protected Graphics2D createGraphics(BufferedImage image)

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.