Package org.apache.druid.data.input.impl
Class ByteEntity
- java.lang.Object
-
- org.apache.druid.data.input.impl.ByteEntity
-
- All Implemented Interfaces:
InputEntity
public class ByteEntity extends Object implements InputEntity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.data.input.InputEntity
InputEntity.CleanableFile
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.data.input.InputEntity
DEFAULT_FETCH_BUFFER_SIZE, DEFAULT_MAX_NUM_FETCH_TRIES, LOG
-
-
Constructor Summary
Constructors Constructor Description ByteEntity(byte[] bytes)
ByteEntity(ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffer
getBuffer()
URI
getUri()
Returns an URI to identify the input entity.InputStream
open()
Opens anInputStream
on the input entity directly.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.data.input.InputEntity
fetch, getRetryCondition
-
-
-
-
Constructor Detail
-
ByteEntity
public ByteEntity(ByteBuffer buffer)
-
ByteEntity
public ByteEntity(byte[] bytes)
-
-
Method Detail
-
getBuffer
public ByteBuffer getBuffer()
-
getUri
@Nullable public URI getUri()
Description copied from interface:InputEntity
Returns an URI to identify the input entity. Implementations can return null if they don't have an unique URI.- Specified by:
getUri
in interfaceInputEntity
-
open
public InputStream open()
Description copied from interface:InputEntity
Opens anInputStream
on the input entity directly. This is the basic way to read the given entity. The behavior of this method is only defined fort the first call to open(). The behavior of subsequent calls is undefined and may vary between implementations.- Specified by:
open
in interfaceInputEntity
- See Also:
InputEntity.fetch(java.io.File, byte[])
-
-