ServletConsole.java
package server.restful.common.parameter;
import com.beust.jcommander.internal.DefaultConsole;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintStream;
import static java.nio.charset.StandardCharsets.UTF_8;
public class ServletConsole extends DefaultConsole {
public ServletConsole(HttpServletResponse response) throws IOException {
super(new PrintStream(response.getOutputStream(), true, UTF_8));
}
@Override
public char[] readPassword(boolean echoInput) {
throw new RuntimeException("readPassword not supported!");
}
}