All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.java_websocket.exceptions.InvalidEncodingException Maven / Gradle / Ivy

Go to download

转接远程的http接口,服务器响应正确的数据格式必须是JResponse定义的格式。 客户端websocket使用"org.java-websocket:Java-WebSocket:1.5.2",项目地址https://github.com/TooTallNate/Java-WebSocket; 对Java-WebSocket做了适当修改。

The newest version!
package org.java_websocket.exceptions;

import java.io.UnsupportedEncodingException;

/**
 * The Character Encoding is not supported.
 *
 * @since 1.4.0
 */
public class InvalidEncodingException extends RuntimeException {

  /**
   * attribute for the encoding exception
   */
  private final UnsupportedEncodingException encodingException;

  /**
   * constructor for InvalidEncodingException
   *
   * @param encodingException the cause for this exception
   */
  public InvalidEncodingException(UnsupportedEncodingException encodingException) {
    if (encodingException == null) {
      throw new IllegalArgumentException();
    }
    this.encodingException = encodingException;
  }

  /**
   * Get the exception which includes more information on the unsupported encoding
   *
   * @return an UnsupportedEncodingException
   */
  public UnsupportedEncodingException getEncodingException() {
    return encodingException;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy