private static final class ByteSource.EmptyByteSource extends ByteSource.ByteArrayByteSource
Modifier and Type | Field and Description |
---|---|
(package private) static ByteSource.EmptyByteSource |
INSTANCE |
bytes, length, offset
Constructor and Description |
---|
EmptyByteSource() |
Modifier and Type | Method and Description |
---|---|
CharSource |
asCharSource(java.nio.charset.Charset charset)
Returns a
CharSource view of this byte source that decodes bytes read from this source
as characters using the given Charset . |
byte[] |
read()
Reads the full contents of this byte source as a byte array.
|
java.lang.String |
toString() |
copyTo, hash, isEmpty, openBufferedStream, openStream, read, size, sizeIfKnown, slice
concat, concat, concat, contentEquals, copyTo, empty, wrap
static final ByteSource.EmptyByteSource INSTANCE
public CharSource asCharSource(java.nio.charset.Charset charset)
ByteSource
CharSource
view of this byte source that decodes bytes read from this source
as characters using the given Charset
.
If CharSource.asByteSource(java.nio.charset.Charset)
is called on the returned source with the same charset,
the default implementation of this method will ensure that the original ByteSource
is
returned, rather than round-trip encoding. Subclasses that override this method should behave
the same way.
asCharSource
in class ByteSource
public byte[] read()
ByteSource
read
in class ByteSource.ByteArrayByteSource
public java.lang.String toString()
toString
in class ByteSource.ByteArrayByteSource