Package org.apache.druid.data.input.impl
Class ByteEntity
java.lang.Object
org.apache.druid.data.input.impl.ByteEntity
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionReturn the buffer backing this entity.getUri()Returns an URI to identify the input entity.open()Opens anInputStreamon the input entity directly.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.data.input.InputEntity
fetch, getRetryCondition
-
Constructor Details
-
ByteEntity
Create a new entity. The buffer is not duplicated, so it is important to ensure that its position and limit are not modified after this entity is created. -
ByteEntity
public ByteEntity(byte[] bytes)
-
-
Method Details
-
getBuffer
Return the buffer backing this entity. Calling code must not modify the mark, position, or limit of this buffer. If you need to modify them, callByteBuffer.duplicate()orByteBuffer.asReadOnlyBuffer()and modify the copy. -
getUri
Description copied from interface:InputEntityReturns an URI to identify the input entity. Implementations can return null if they don't have an unique URI.- Specified by:
getUriin interfaceInputEntity
-
open
Description copied from interface:InputEntityOpens anInputStreamon the input entity directly. This is the basic way to read the given entity. This method may be called multiple times to re-read the data from the entity.- Specified by:
openin interfaceInputEntity- See Also:
-