Package de.espirit.firstspirit.access
Class ConnectionManager.ClientJarInputStream
java.lang.Object
java.io.InputStream
de.espirit.firstspirit.access.ConnectionManager.ClientJarInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Enclosing class:
- ConnectionManager
An input stream for accessing client jars.
- Since:
- 4.0.17
- 
Constructor SummaryConstructorsConstructorDescriptionClientJarInputStream(String host, int port, int mode, String servletZone) Constructs a stream by the given arguments.
- 
Method SummaryModifier and TypeMethodDescriptionintIndicates the stream to be available.voidclose()Closes the stream.longProvides the size of the jar.booleanIndicates, whether this stream supports mark and reset.intread()Reads a byte.intread(byte @NotNull [] b) Reads some bytes into the given byte buffer.intread(byte @NotNull [] b, int off, int len) Reads some bytes into the given byte buffer starting at the given offset of that buffer.Methods inherited from class java.io.InputStreammark, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
- 
Constructor Details- 
ClientJarInputStreamConstructs a stream by the given arguments.- Parameters:
- host- The server host name.
- port- The server port.
- mode- The connection mode, one of- ConnectionManager.HTTP_MODEor- ConnectionManager.SOCKET_MODE.
- servletZone- The servlet zone, only used when mode is- ConnectionManager.HTTP_MODE.
- Throws:
- IOException
- Since:
- 4.0.17
 
 
- 
- 
Method Details- 
availableIndicates the stream to be available.- Overrides:
- availablein class- InputStream
- Returns:
- true, if available.
- Throws:
- IOException
- Since:
- 4.0.17
 
- 
getClientJarSizepublic long getClientJarSize()Provides the size of the jar.- Returns:
- The jar's size.
- Since:
- 4.0.17
 
- 
closepublic void close()Closes the stream.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Since:
- 4.0.17
 
- 
markSupportedpublic boolean markSupported()Indicates, whether this stream supports mark and reset.- Overrides:
- markSupportedin class- InputStream
- Returns:
- Always false, as both methods are not supported.
- Since:
- 4.0.17
 
- 
readReads a byte.- Specified by:
- readin class- InputStream
- Returns:
- The next byte.
- Throws:
- IOException
- Since:
- 4.0.17
 
- 
readReads some bytes into the given byte buffer.- Overrides:
- readin class- InputStream
- Parameters:
- b- A buffer.
- Returns:
- The number of read bytes.
- Throws:
- IOException- If reading bytes failed.
- Since:
- 4.0.17
 
- 
readReads some bytes into the given byte buffer starting at the given offset of that buffer. Will read at most the defined number of bytes.- Overrides:
- readin class- InputStream
- Parameters:
- b- A buffer.
- off- The write offset.
- len- The number of bytes to read.
- Returns:
- The actual number of bytes read.
- Throws:
- IOException- If reading bytes failed.
- Since:
- 4.0.17
 
 
-