类 EncodedResource

java.lang.Object
cn.taketoday.core.io.EncodedResource
所有已实现的接口:
InputStreamSource, ThrowingConsumer<OutputStream>, Consumer<OutputStream>

public class EncodedResource extends Object implements InputStreamSource
Holder that combines a Resource descriptor with a specific encoding or Charset to be used for reading from the resource.

Used as an argument for operations that support reading content with a specific encoding, typically via a java.io.Reader.

从以下版本开始:
4.0
作者:
Juergen Hoeller, Sam Brannen, TODAY
2019-12-05 23:17
另请参阅:
  • 字段详细资料

    • encoding

      private final String encoding
    • charset

      private final Charset charset
    • resource

      private final Resource resource
  • 构造器详细资料

    • EncodedResource

      public EncodedResource(Resource resource)
      Create a new EncodedResource for the given Resource, not specifying an explicit encoding or Charset.
      参数:
      resource - the Resource to hold (never null)
    • EncodedResource

      public EncodedResource(Resource resource, String encoding)
      Create a new EncodedResource for the given Resource, using the specified encoding.
      参数:
      resource - the Resource to hold (never null)
      encoding - the encoding to use for reading from the resource
    • EncodedResource

      public EncodedResource(Resource resource, Charset charset)
      Create a new EncodedResource for the given Resource, using the specified Charset.
      参数:
      resource - the Resource to hold (never null)
      charset - the Charset to use for reading from the resource
    • EncodedResource

      private EncodedResource(Resource resource, String encoding, Charset charset)
  • 方法详细资料