1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Changes suggested by SquidDev and update help file

This commit is contained in:
Wilma456 2017-09-24 17:36:20 +02:00
parent f20a7afa7f
commit 4fb0240a36
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import dan200.computercraft.api.lua.LuaException;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.io.*; import java.io.*;
import java.util.Arrays;
import static dan200.computercraft.core.apis.ArgumentHelper.*; import static dan200.computercraft.core.apis.ArgumentHelper.*;
@ -119,7 +118,7 @@ public class EncodedInputHandle extends HandleGeneric
char[] bytes = new char[ count ]; char[] bytes = new char[ count ];
count = m_reader.read( bytes ); count = m_reader.read( bytes );
if( count < 0 ) return null; if( count < 0 ) return null;
String str = new String( bytes ); String str = new String( bytes, 0, count );
return new Object[] { str }; return new Object[] { str };
} }
catch( IOException e ) catch( IOException e )

View File

@ -22,6 +22,7 @@ Functions on files opened with mode "r":
readLine() readLine()
readAll() readAll()
close() close()
read( number )
Functions on files opened with mode "w" or "a": Functions on files opened with mode "w" or "a":
write( string ) write( string )
@ -36,4 +37,4 @@ close()
Functions on files opened with mode "wb" or "ab": Functions on files opened with mode "wb" or "ab":
write( byte ) write( byte )
flush() flush()
close() close()