comparison src/luan/modules/Utils.java @ 1509:0ba144491a42

lucene.backup zip
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 May 2020 14:29:33 -0600
parents 471ef3e6a84e
children
comparison
equal deleted inserted replaced
1508:86c5e7000ecf 1509:0ba144491a42
63 checkNotNull(fn,"function",pos); 63 checkNotNull(fn,"function",pos);
64 } 64 }
65 65
66 public static void checkNotNull(LuanFunction fn) throws LuanException { 66 public static void checkNotNull(LuanFunction fn) throws LuanException {
67 checkNotNull(fn,1); 67 checkNotNull(fn,1);
68 }
69
70 public static String readAll(Reader in)
71 throws IOException
72 {
73 char[] a = new char[bufSize];
74 StringBuilder buf = new StringBuilder();
75 int n;
76 while( (n=in.read(a)) != -1 ) {
77 buf.append(a,0,n);
78 }
79 return buf.toString();
80 } 68 }
81 69
82 public static byte[] readAll(InputStream in) 70 public static byte[] readAll(InputStream in)
83 throws IOException 71 throws IOException
84 { 72 {