Top Description Inners Fields Constructors Methods
org.eclipse.jetty.io

public Class Content

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, java.nio.ByteBuffer, java.nio.charset.Charset, .StandardCharsets, java.util.Objects, java.util.concurrent.CompletableFuture, .Flow, java.util.function.Consumer, org.eclipse.jetty.io.content.BufferedContentSink, .ContentSinkOutputStream, .ContentSinkSubscriber, .ContentSourceInputStream, .ContentSourcePublisher, org.eclipse.jetty.io.internal.ByteBufferChunk, .ContentCopier, .ContentSourceByteBuffer, .ContentSourceConsumer, .ContentSourceString, org.eclipse.jetty.util.Blocker, .BufferUtil, .Callback, .FutureCallback, .FuturePromise, .IO, .Promise, org.slf4j.Logger, .LoggerFactory

Namespace class that contains the definitions of a content source, a content sink and a content chunk.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Content.Chunk

A chunk of content indicating whether it is the last chunk.

public static interface
Content.Sink

A content sink that writes the content to its implementation (a socket, a file, etc.).

public static interface
Content.Source

A source of content that can be read with a read/demand model.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
copy(Content.Source
the source to copy from
source
,
Content.Sink
the sink to copy to
sink
,
Callback
the callback to notify when the copy is complete
callback
)

Copies the given content source to the given content sink, notifying the given callback when the copy is complete (either succeeded or failed).

public static void
copy(Content.Source
the source to copy from
source
,
Content.Sink
the sink to copy to
sink
,
Content.Chunk.Processor
a (possibly null) predicate to handle the current chunk and its callback
chunkProcessor
,
Callback
the callback to notify when the copy is complete
callback
)

Copies the given content source to the given content sink, notifying the given callback when the copy is complete.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait