8305457: Implement java.io.IO

Reviewed-by: naoto, smarks, jpai, jlahoda
This commit is contained in:
Pavel Rappo 2024-05-24 13:37:14 +00:00
parent 6a35311468
commit c099f14f07
15 changed files with 695 additions and 5 deletions

View file

@ -81,6 +81,42 @@ final class ProxyingConsole extends Console {
return reader;
}
/**
* {@inheritDoc}
*/
@Override
public Console println(Object obj) {
synchronized (writeLock) {
delegate.println(obj);
}
return this;
}
/**
* {@inheritDoc}
*/
@Override
public Console print(Object obj) {
synchronized (writeLock) {
delegate.print(obj);
}
return this;
}
/**
* {@inheritDoc}
*
* @throws IOError {@inheritDoc}
*/
@Override
public String readln(String prompt) {
synchronized (writeLock) {
synchronized (readLock) {
return delegate.readln(prompt);
}
}
}
/**
* {@inheritDoc}
*/