Package hudson.remoting
Class RemoteInputStream
- java.lang.Object
-
- java.io.InputStream
-
- hudson.remoting.RemoteInputStream
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,SerializableOnlyOverRemoting
public class RemoteInputStream extends InputStream implements SerializableOnlyOverRemoting
WrapsInputStream
so that it can be sent over the remoting channel.Note that this class by itself does not perform buffering.
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteInputStream.Flag
-
Constructor Summary
Constructors Constructor Description RemoteInputStream(InputStream core)
Deprecated.as of 2.35 UseRemoteInputStream(InputStream, Flag)
and specify eitherRemoteInputStream.Flag.GREEDY
orRemoteInputStream.Flag.NOT_GREEDY
.RemoteInputStream(InputStream core, boolean autoUnexport)
Deprecated.as of 2.35 UseRemoteInputStream(InputStream, Flag, Flag )
withRemoteInputStream.Flag.MANUAL_UNEXPORT
.RemoteInputStream(InputStream core, RemoteInputStream.Flag f)
RemoteInputStream(InputStream core, RemoteInputStream.Flag f1, RemoteInputStream.Flag f2)
RemoteInputStream(InputStream core, Set<RemoteInputStream.Flag> flags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
void
reset()
long
skip(long n)
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jenkinsci.remoting.SerializableOnlyOverRemoting
getChannelForSerialization
-
-
-
-
Constructor Detail
-
RemoteInputStream
@Deprecated public RemoteInputStream(InputStream core)
Deprecated.as of 2.35 UseRemoteInputStream(InputStream, Flag)
and specify eitherRemoteInputStream.Flag.GREEDY
orRemoteInputStream.Flag.NOT_GREEDY
.Short forRemoteInputStream(core,true)
.
-
RemoteInputStream
@Deprecated public RemoteInputStream(InputStream core, boolean autoUnexport)
Deprecated.as of 2.35 UseRemoteInputStream(InputStream, Flag, Flag )
withRemoteInputStream.Flag.MANUAL_UNEXPORT
. Also specify eitherRemoteInputStream.Flag.GREEDY
orRemoteInputStream.Flag.NOT_GREEDY
.- Parameters:
autoUnexport
- If true, theInputStream
will be automatically unexported when the callable that took it with returns. If false, it'll not unexported until the close method is called.
-
RemoteInputStream
public RemoteInputStream(InputStream core, RemoteInputStream.Flag f)
- Since:
- 2.35
-
RemoteInputStream
public RemoteInputStream(InputStream core, RemoteInputStream.Flag f1, RemoteInputStream.Flag f2)
- Since:
- 2.35
-
RemoteInputStream
public RemoteInputStream(InputStream core, Set<RemoteInputStream.Flag> flags)
- Since:
- 2.35
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(@NonNull byte[] b) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read(@NonNull byte[] b, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
mark
in classInputStream
-
reset
public void reset() throws IOException
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
-