|
1 | 1 | /* |
2 | | - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
31 | 31 | import jdk.internal.access.SharedSecrets; |
32 | 32 | import jdk.internal.io.JdkConsoleImpl; |
33 | 33 | import jdk.internal.io.JdkConsoleProvider; |
34 | | -import jdk.internal.javac.PreviewFeature; |
35 | 34 | import sun.nio.cs.UTF_8; |
36 | 35 |
|
37 | 36 | /** |
@@ -148,100 +147,6 @@ public Reader reader() { |
148 | 147 | throw newUnsupportedOperationException(); |
149 | 148 | } |
150 | 149 |
|
151 | | - /** |
152 | | - * Writes a string representation of the specified object to this console's |
153 | | - * output stream, terminates the line using {@link System#lineSeparator()} |
154 | | - * and then flushes the console. |
155 | | - * |
156 | | - * <p> The string representation of the specified object is obtained as if |
157 | | - * by calling {@link String#valueOf(Object)}. |
158 | | - * |
159 | | - * @param obj |
160 | | - * An object whose string representation is to be written, |
161 | | - * may be {@code null}. |
162 | | - * |
163 | | - * @return This console |
164 | | - * |
165 | | - * @since 23 |
166 | | - */ |
167 | | - @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES) |
168 | | - public Console println(Object obj) { |
169 | | - throw newUnsupportedOperationException(); |
170 | | - } |
171 | | - |
172 | | - /** |
173 | | - * Terminates the current line in this console's output stream using |
174 | | - * {@link System#lineSeparator()} and then flushes the console. |
175 | | - * |
176 | | - * @return This console |
177 | | - * |
178 | | - * @since 24 |
179 | | - */ |
180 | | - @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES) |
181 | | - public Console println() { |
182 | | - return println(""); |
183 | | - } |
184 | | - |
185 | | - /** |
186 | | - * Writes a string representation of the specified object to this console's |
187 | | - * output stream and then flushes the console. |
188 | | - * |
189 | | - * <p> The string representation of the specified object is obtained as if |
190 | | - * by calling {@link String#valueOf(Object)}. |
191 | | - * |
192 | | - * @param obj |
193 | | - * An object whose string representation is to be written, |
194 | | - * may be {@code null}. |
195 | | - * |
196 | | - * @return This console |
197 | | - * |
198 | | - * @since 23 |
199 | | - */ |
200 | | - @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES) |
201 | | - public Console print(Object obj) { |
202 | | - throw newUnsupportedOperationException(); |
203 | | - } |
204 | | - |
205 | | - /** |
206 | | - * Writes a prompt as if by calling {@code print}, then reads a single line |
207 | | - * of text from this console. |
208 | | - * |
209 | | - * @param prompt |
210 | | - * A prompt string, may be {@code null}. |
211 | | - * |
212 | | - * @throws IOError |
213 | | - * If an I/O error occurs. |
214 | | - * |
215 | | - * @return A string containing the line read from the console, not |
216 | | - * including any line-termination characters, or {@code null} |
217 | | - * if an end of stream has been reached without having read |
218 | | - * any characters. |
219 | | - * |
220 | | - * @since 23 |
221 | | - */ |
222 | | - @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES) |
223 | | - public String readln(String prompt) { |
224 | | - throw newUnsupportedOperationException(); |
225 | | - } |
226 | | - |
227 | | - /** |
228 | | - * Reads a single line of text from this console. |
229 | | - * |
230 | | - * @throws IOError |
231 | | - * If an I/O error occurs. |
232 | | - * |
233 | | - * @return A string containing the line read from the console, not |
234 | | - * including any line-termination characters, or {@code null} |
235 | | - * if an end of stream has been reached without having read |
236 | | - * any characters. |
237 | | - * |
238 | | - * @since 24 |
239 | | - */ |
240 | | - @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES) |
241 | | - public String readln() { |
242 | | - throw newUnsupportedOperationException(); |
243 | | - } |
244 | | - |
245 | 150 | /** |
246 | 151 | * Writes a formatted string to this console's output stream using |
247 | 152 | * the specified format string and arguments with the |
|
0 commit comments