comparison src/luan/modules/IoLuan.java @ 1470:580ee513a4b7

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 14 Apr 2020 17:12:06 -0600
parents b765f146f4dc
children 6c6ce14db6a8
comparison
equal deleted inserted replaced
1469:21f5edab1fbf 1470:580ee513a4b7
299 public OutputStream binary_writer() throws IOException { 299 public OutputStream binary_writer() throws IOException {
300 return new BufferedOutputStream(outputStream()); 300 return new BufferedOutputStream(outputStream());
301 } 301 }
302 302
303 public void write_text(Object... args) throws LuanException, IOException { 303 public void write_text(Object... args) throws LuanException, IOException {
304 LuanWriter luanWriter = luanWriter(new BufferedWriter(writer())); 304 LuanWriter luanWriter = text_writer();
305 luanWriter.write(args); 305 luanWriter.write(args);
306 luanWriter.close(); 306 luanWriter.close();
307 }
308
309 public void write_binary(byte[] bytes) throws LuanException, IOException {
310 OutputStream out = binary_writer();
311 out.write(bytes);
312 out.close();
307 } 313 }
308 } 314 }
309 315
310 public static final LuanIO nullIO = new LuanIO() { 316 public static final LuanIO nullIO = new LuanIO() {
311 private final InputStream in = new InputStream() { 317 private final InputStream in = new InputStream() {