java.lang.Object
org.glassfish.grizzly.streams.BufferedInput
- All Implemented Interfaces:
Input
- Direct Known Subclasses:
DefaultStreamReader.Input,TransformerInput
- Author:
- Alexey Stashok
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CompletionHandler<Integer>protected final CompositeBufferprotected Conditionprotected FutureImpl<Integer>protected booleanprotected final ReentrantReadWriteLockprotected Exception -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()Return the Input'sBuffer.final booleanprotected voidnotifyCompleted(CompletionHandler<Integer> completionHandler) notifyCondition(Condition condition, CompletionHandler<Integer> completionHandler) protected voidnotifyFailure(CompletionHandler<Integer> completionHandler, Throwable failure) protected abstract voidprotected abstract voidbooleanbyteread()intsize()voidskip(int length) Takes the Input'sBuffer.
-
Field Details
-
compositeBuffer
-
lock
-
isCompletionHandlerRegistered
protected boolean isCompletionHandlerRegistered -
registrationStackTrace
-
condition
-
completionHandler
-
future
-
-
Constructor Details
-
BufferedInput
public BufferedInput()
-
-
Method Details
-
onOpenInputSource
- Throws:
IOException
-
onCloseInputSource
- Throws:
IOException
-
append
-
prepend
-
read
- Specified by:
readin interfaceInput- Throws:
IOException
-
skip
public void skip(int length) -
isBuffered
public final boolean isBuffered()- Specified by:
isBufferedin interfaceInput
-
getBuffer
Description copied from interface:InputReturn the Input'sBuffer. -
takeBuffer
Description copied from interface:Input- Specified by:
takeBufferin interfaceInput- Returns:
- the Input's
Buffer. This Input should never try to access thisBuffer.
-
size
public int size() -
close
public void close() -
notifyCondition
public GrizzlyFuture<Integer> notifyCondition(Condition condition, CompletionHandler<Integer> completionHandler) - Specified by:
notifyConditionin interfaceInput
-
notifyCompleted
-
notifyFailure
-