| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | NamedPipeSocketFactory.
A socket that encapsulates named pipes on Windows |
| pack-priv class | NamedPipeSocketFactory.
Enables OutputStream-type functionality for a RandomAccessFile |
| pack-priv class | NamedPipeSocketFactory.
Enables OutputStream-type functionality for a RandomAccessFile |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private Socket |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T extends Closeable> T | connect(String
the hostname passed in the URL. It will be a single
hostname, as the driver parses multi-hosts (for failover) and
calls this method for each host connection attempt. host, int the port number to connect to (if required). portNumber, PropertySet properties passed to the driver via the URL and/or properties
instance. props, int login timeout in milliseconds loginTimeout)Implements com. Creates a new socket or channel using the given properties. |
| public boolean | isLocallyConnected(Session sess)
Overrides default com.
|
| public <T extends Closeable> T | performTlsHandshake(SocketConnection
current SocketConnection socketConnection, ServerSession current ServerSession serverSession)Implements com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake. |
| public <T extends Closeable> T | performTlsHandshake(SocketConnection
current SocketConnection socketConnection, ServerSession current ServerSession serverSession, Log logger log)Overrides default com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake. |
| DEFAULT_TIMEOUT | back to summary |
|---|---|
| private static final int DEFAULT_TIMEOUT | |
| namedPipeSocket | back to summary |
|---|---|
| private Socket namedPipeSocket | |
| NamedPipeSocketFactory | back to summary |
|---|---|
| public NamedPipeSocketFactory() Constructor for NamedPipeSocketFactory. | |
| connect | back to summary |
|---|---|
| public <T extends Closeable> T connect(String host, int portNumber, PropertySet props, int loginTimeout) throws IOException Implements com. Doc from com. Creates a new socket or channel using the given properties. Properties are parsed by
the driver from the URL. All properties other than sensitive ones (user
and password) are passed to this method. The driver will instantiate the
socket factory with the class name given in the property
"socketFactory", where the standard is
| |
| isLocallyConnected | back to summary |
|---|---|
| public boolean isLocallyConnected(Session sess) Overrides default com.
| |
| performTlsHandshake | back to summary |
|---|---|
| public <T extends Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws IOException Implements com. Doc from com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.
| |
| performTlsHandshake | back to summary |
|---|---|
| public <T extends Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession, Log log) throws IOException Overrides default com. Doc from com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final Lock | |
| private RandomAccessFile |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public InputStream | |
| public OutputStream | getOutputStream()
Overrides java. Returns an output stream for this socket. |
| public boolean | |
| public void | shutdownInput()
Overrides java. Places the input stream for this socket at "end of stream". |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| lock | back to summary |
|---|---|
| private final Lock lock | |
| namedPipeFile | back to summary |
|---|---|
| private RandomAccessFile namedPipeFile | |
| NamedPipeSocket | back to summary |
|---|---|
| pack-priv NamedPipeSocket(String filePath, int timeout) throws IOException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this socket.
Any thread currently blocked in an I/O operation upon this socket
will throw a Once a socket has been closed, it is not available for further networking use (i.e. can't be reconnected or rebound) and several of the methods defined by this class will throw an exception if invoked on the closed socket. A new socket needs to be created. Closing this socket will also close the socket's
If this socket has an associated channel then the channel is closed as well.
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Overrides java. Doc from java. Returns an input stream for this socket. If this socket has an associated channel then the resulting input
stream delegates all of its operations to the channel. If the channel
is in non-blocking mode then the input stream's Reading from the input stream is interruptible in the following circumstances:
Under abnormal conditions the underlying connection may be broken by the remote host or the network software (for example a connection reset in the case of TCP connections). When a broken connection is detected by the network software the following applies to the returned input stream :-
Closing the returned
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws IOException Overrides java. Doc from java. Returns an output stream for this socket. If this socket has an associated channel then the resulting output
stream delegates all of its operations to the channel. If the channel
is in non-blocking mode then the output stream's Writing to the output stream is interruptible in the following circumstances:
Closing the returned
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Overrides java. Doc from java. Returns the closed state of the socket.
| |
| shutdownInput | back to summary |
|---|---|
| public void shutdownInput() throws IOException Overrides java. Doc from java. Places the input stream for this socket at "end of stream". Any data sent to the input stream side of the socket is acknowledged and then silently discarded.
If you read from a socket input stream after invoking this method on the
socket, the stream's
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv RandomAccessFile |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b)Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| raFile | back to summary |
|---|---|
| pack-priv RandomAccessFile raFile | |
| RandomAccessFileInputStream | back to summary |
|---|---|
| pack-priv RandomAccessFileInputStream(RandomAccessFile file) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Doc from java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv RandomAccessFile |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| public void | write(byte[]
the data. b)Overrides java. Writes |
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| public void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| raFile | back to summary |
|---|---|
| pack-priv RandomAccessFile raFile | |
| RandomAccessFileOutputStream | back to summary |
|---|---|
| pack-priv RandomAccessFileOutputStream(RandomAccessFile file) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |