Skip to content

Commit

Permalink
Fix for javadoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
soklakov committed Mar 12, 2020
1 parent c6dbf00 commit 0a943a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ private Compression parseCompressedMessage() {
*
* @return
* <code>true</code> if this frame's bytes weren't all consumed yet, <code>false</code> otherwise.
*
* @throws IOException
* if any of the underlying I/O operations fail.
*/
private boolean isDataAvailable() throws IOException {
return isCompressedDataAvailable() || this.frameHeaderConsumed > 0 && this.frameHeaderConsumed < HEADER_LENGTH
Expand All @@ -257,6 +260,9 @@ private boolean isDataAvailable() throws IOException {
*
* @return
* <code>true</code> if there is compressed data available, <code>false</code> otherwise.
*
* @throws IOException
* if any of the underlying I/O operations fail.
*/
private boolean isCompressedDataAvailable() throws IOException {
return this.compressorIn != null && this.compressorIn.available() > 0;
Expand All @@ -267,6 +273,9 @@ private boolean isCompressedDataAvailable() throws IOException {
*
* @return
* <code>true</code> if all compressed data was consumed, <code>false</code> otherwise.
*
* @throws IOException
* if any of the underlying I/O operations fail.
*/
private boolean isCompressedDataReadComplete() throws IOException {
return this.compressorIn != null && this.compressorIn.available() == 0;
Expand Down Expand Up @@ -315,15 +324,18 @@ private final int readFully(byte[] b, int off, int len) throws IOException {
/**
* Reads the exact number of requested bytes from the given {@link InputStream}, blocking if needed.
*
* @param inStream
* input stream to read from
* @param b
* the buffer into which the data is read.
* @param off
* the start offset in the destination array <code>b</code>
* @param len
* the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or <code>-1</code> if there is no more data because the end of the stream has been reached.
* @exception IOException
* if any of the underlying I/O operations fail.
*
* @throws IOException
* if any of the underlying I/O operations fail.
*/
private final int readFully(InputStream inStream, byte[] b, int off, int len) throws IOException {
if (len < 0) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/user-api/java/com/mysql/cj/xdevapi/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,19 @@ public Validation getValidation() {
* {@link Schema#modifyCollection(String, ModifyCollectionOptions)}.
* <p>
* Allowed options are:
* <ul>
* <li>schema - JSON schema as a String
* <li>level - {@link ValidationLevel}
* </ul>
*/
public static class Validation {

/**
* Defines how validation options are applied.
* <ul>
* <li>STRICT - enable JSON schema validation for documents in the collection.
* <li>OFF - disable JSON schema validation.
* </ul>
*/
public static enum ValidationLevel {
STRICT, OFF
Expand Down

0 comments on commit 0a943a6

Please sign in to comment.