Package org.eclipse.jetty.io
Class ByteArrayEndPoint
- java.lang.Object
-
- org.eclipse.jetty.io.IdleTimeout
-
- org.eclipse.jetty.io.AbstractEndPoint
-
- org.eclipse.jetty.io.ByteArrayEndPoint
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,EndPoint
- Direct Known Subclasses:
LocalConnector.LocalEndPoint
@Deprecated(since="2021-05-27") public class ByteArrayEndPoint extends AbstractEndPoint
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.ByteArrayEndPoint.
-
-
Constructor Summary
Constructors Constructor Description ByteArrayEndPoint()
Deprecated.ByteArrayEndPoint(byte[] input, int outputSize)
Deprecated.ByteArrayEndPoint(java.lang.String input, int outputSize)
Deprecated.ByteArrayEndPoint(Scheduler scheduler, long idleTimeoutMs)
Deprecated.ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, byte[] input, int outputSize)
Deprecated.ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, java.lang.String input, int outputSize)
Deprecated.ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, java.nio.ByteBuffer input, java.nio.ByteBuffer output)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addInput(java.lang.String s)
Deprecated.void
addInput(java.lang.String s, java.nio.charset.Charset charset)
Deprecated.void
addInput(java.nio.ByteBuffer in)
Deprecated.void
addInputAndExecute(java.nio.ByteBuffer in)
Deprecated.void
addInputEOF()
Deprecated.void
doClose()
Deprecated.void
doShutdownOutput()
Deprecated.int
fill(java.nio.ByteBuffer buffer)
Deprecated.Fill the passed buffer with data from this endpoint.boolean
flush(java.nio.ByteBuffer... buffers)
Deprecated.Flush data from the passed header/buffer to this endpoint.java.net.InetSocketAddress
getLocalAddress()
Deprecated.java.nio.ByteBuffer
getOutput()
Deprecated.java.lang.String
getOutputString()
Deprecated.java.lang.String
getOutputString(java.nio.charset.Charset charset)
Deprecated.java.net.InetSocketAddress
getRemoteAddress()
Deprecated.java.lang.Object
getTransport()
Deprecated.boolean
hasMore()
Deprecated.boolean
isGrowOutput()
Deprecated.void
reset()
Deprecated.void
setGrowOutput(boolean growOutput)
Deprecated.void
setOutput(java.nio.ByteBuffer out)
Deprecated.java.nio.ByteBuffer
takeOutput()
Deprecated.java.lang.String
takeOutputString()
Deprecated.java.lang.String
takeOutputString(java.nio.charset.Charset charset)
Deprecated.java.lang.String
toString()
Deprecated.java.nio.ByteBuffer
waitForOutput(long time, java.util.concurrent.TimeUnit unit)
Deprecated.Wait for some output-
Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
checkFill, checkFlush, close, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getWriteFlusher, isFillInterested, isInputShutdown, isOpen, isOptimizedForDirectBuffers, isOutputShutdown, onClose, onOpen, setConnection, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, write
-
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
getIdleFor, getIdleTimeout, getScheduler, notIdle, setIdleTimeout
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.io.EndPoint
getIdleTimeout, setIdleTimeout
-
-
-
-
Constructor Detail
-
ByteArrayEndPoint
public ByteArrayEndPoint()
Deprecated.
-
ByteArrayEndPoint
public ByteArrayEndPoint(byte[] input, int outputSize)
Deprecated.- Parameters:
input
- the input bytesoutputSize
- the output size
-
ByteArrayEndPoint
public ByteArrayEndPoint(java.lang.String input, int outputSize)
Deprecated.- Parameters:
input
- the input string (converted to bytes using default encoding charset)outputSize
- the output size
-
ByteArrayEndPoint
public ByteArrayEndPoint(Scheduler scheduler, long idleTimeoutMs)
Deprecated.
-
ByteArrayEndPoint
public ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, byte[] input, int outputSize)
Deprecated.
-
ByteArrayEndPoint
public ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, java.lang.String input, int outputSize)
Deprecated.
-
ByteArrayEndPoint
public ByteArrayEndPoint(Scheduler timer, long idleTimeoutMs, java.nio.ByteBuffer input, java.nio.ByteBuffer output)
Deprecated.
-
-
Method Detail
-
doShutdownOutput
public void doShutdownOutput()
Deprecated.
-
doClose
public void doClose()
Deprecated.
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
Deprecated.- Returns:
- The local Inet address to which this
EndPoint
is bound, ornull
if thisEndPoint
does not represent a network connection.
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
Deprecated.- Returns:
- The remote Inet address to which this
EndPoint
is bound, ornull
if thisEndPoint
does not represent a network connection.
-
addInputEOF
public void addInputEOF()
Deprecated.
-
addInput
public void addInput(java.nio.ByteBuffer in)
Deprecated.- Parameters:
in
- The in to set.
-
addInputAndExecute
public void addInputAndExecute(java.nio.ByteBuffer in)
Deprecated.
-
addInput
public void addInput(java.lang.String s)
Deprecated.
-
addInput
public void addInput(java.lang.String s, java.nio.charset.Charset charset)
Deprecated.
-
getOutput
public java.nio.ByteBuffer getOutput()
Deprecated.- Returns:
- Returns the out.
-
getOutputString
public java.lang.String getOutputString()
Deprecated.- Returns:
- Returns the out.
-
getOutputString
public java.lang.String getOutputString(java.nio.charset.Charset charset)
Deprecated.- Parameters:
charset
- the charset to encode the output as- Returns:
- Returns the out.
-
takeOutput
public java.nio.ByteBuffer takeOutput()
Deprecated.- Returns:
- Returns the out.
-
waitForOutput
public java.nio.ByteBuffer waitForOutput(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Deprecated.Wait for some output- Parameters:
time
- Time to waitunit
- Units for time to wait- Returns:
- The buffer of output
- Throws:
java.lang.InterruptedException
- if interrupted
-
takeOutputString
public java.lang.String takeOutputString()
Deprecated.- Returns:
- Returns the out.
-
takeOutputString
public java.lang.String takeOutputString(java.nio.charset.Charset charset)
Deprecated.- Parameters:
charset
- the charset to encode the output as- Returns:
- Returns the out.
-
setOutput
public void setOutput(java.nio.ByteBuffer out)
Deprecated.- Parameters:
out
- The out to set.
-
hasMore
public boolean hasMore()
Deprecated.- Returns:
true
if there are bytes remaining to be read from the encoded input
-
fill
public int fill(java.nio.ByteBuffer buffer) throws java.io.IOException
Deprecated.Description copied from interface:EndPoint
Fill the passed buffer with data from this endpoint. The bytes are appended to any data already in the buffer by writing from the buffers limit up to it's capacity. The limit is updated to include the filled bytes.- Parameters:
buffer
- The buffer to fill. The position and limit are modified during the fill. After the operation, the position is unchanged and the limit is increased to reflect the new data filled.- Returns:
- an
int
value indicating the number of bytes filled or -1 if EOF is read or the input is shutdown. - Throws:
java.io.IOException
- if the endpoint is closed.
-
flush
public boolean flush(java.nio.ByteBuffer... buffers) throws java.io.IOException
Deprecated.Description copied from interface:EndPoint
Flush data from the passed header/buffer to this endpoint. As many bytes as can be consumed are taken from the header/buffer position up until the buffer limit. The header/buffers position is updated to indicate how many bytes have been consumed.- Parameters:
buffers
- the buffers to flush- Returns:
- True IFF all the buffers have been consumed and the endpoint has flushed the data to its destination (ie is not buffering any data).
- Throws:
java.io.IOException
- If the endpoint is closed or output is shutdown.
-
reset
public void reset()
Deprecated.
-
getTransport
public java.lang.Object getTransport()
Deprecated.- Returns:
- The underlying transport object (socket, channel, etc.)
-
isGrowOutput
public boolean isGrowOutput()
Deprecated.- Returns:
- the growOutput
-
setGrowOutput
public void setGrowOutput(boolean growOutput)
Deprecated.- Parameters:
growOutput
- the growOutput to set
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classAbstractEndPoint
-
-