diff 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
line wrap: on
line diff
--- a/src/luan/modules/IoLuan.java	Tue Apr 14 13:15:18 2020 -0600
+++ b/src/luan/modules/IoLuan.java	Tue Apr 14 17:12:06 2020 -0600
@@ -301,10 +301,16 @@
 		}
 
 		public void write_text(Object... args) throws LuanException, IOException {
-			LuanWriter luanWriter = luanWriter(new BufferedWriter(writer()));
+			LuanWriter luanWriter = text_writer();
 			luanWriter.write(args);
 			luanWriter.close();
 		}
+
+		public void write_binary(byte[] bytes) throws LuanException, IOException {
+			OutputStream out = binary_writer();
+			out.write(bytes);
+			out.close();
+		}
 	}
 
 	public static final LuanIO nullIO = new LuanIO() {