org.luaj.vm2.lib
Class IoLib.File

java.lang.Object
  extended by org.luaj.vm2.Varargs
      extended by org.luaj.vm2.LuaValue
          extended by org.luaj.vm2.lib.IoLib.File
Enclosing class:
IoLib

protected abstract class IoLib.File
extends LuaValue


Field Summary
 
Fields inherited from class org.luaj.vm2.LuaValue
ADD, CALL, CONCAT, DIV, EMPTYSTRING, ENV, EQ, FALSE, INDEX, LE, LEN, LT, METATABLE, MINUSONE, MOD, MODE, MUL, NEWINDEX, NIL, NILS, NONE, NOVALS, ONE, POW, SUB, TBOOLEAN, TFUNCTION, TINT, TLIGHTUSERDATA, TNIL, TNONE, TNUMBER, TOSTRING, TRUE, TSTRING, TTABLE, TTHREAD, TUSERDATA, TVALUE, TYPE_NAMES, UNM, ZERO
 
Constructor Summary
protected IoLib.File()
           
 
Method Summary
abstract  void close()
           
abstract  void flush()
           
 LuaValue get(LuaValue key)
          Get a value in a table including metatag processing using LuaValue.INDEX.
abstract  boolean isclosed()
           
abstract  boolean isstdfile()
           
abstract  int peek()
           
abstract  int read()
           
abstract  int read(byte[] bytes, int offset, int length)
           
abstract  int remaining()
           
abstract  int seek(java.lang.String option, int bytecount)
           
abstract  void setvbuf(java.lang.String mode, int size)
           
 java.lang.String tojstring()
          Convert to human readable String for any type.
 int type()
          Get the enumeration value for the type of this value.
 java.lang.String typename()
          Get the String name of the type of this value.
abstract  void write(LuaString string)
           
 
Methods inherited from class org.luaj.vm2.LuaValue
add, add, add, and, arg, arg1, argerror, argerror, aritherror, aritherror, arithmt, arithmtwith, assert_, buffer, call, call, call, call, call, callmt, checkboolean, checkclosure, checkdouble, checkfunction, checkglobals, checkint, checkinteger, checkjstring, checklong, checkmetatag, checknotnil, checknumber, checknumber, checkstring, checktable, checkthread, checkuserdata, checkuserdata, compareerror, compareerror, comparemt, concat, concat, concatmt, concatTo, concatTo, concatTo, div, div, div, divInto, eq_b, eq, eqmtcall, equals, error, get, get, getmetatable, gettable, gt_b, gt_b, gt_b, gt, gt, gt, gteq_b, gteq_b, gteq_b, gteq, gteq, gteq, illegal, inext, initupvalue1, invoke, invoke, invoke, invoke, invoke, invoke, invokemethod, invokemethod, invokemethod, invokemethod, invokemethod, invokemethod, isboolean, isclosure, isfunction, isint, isinttype, islong, isnil, isnumber, isstring, istable, isthread, isuserdata, isuserdata, isvalidkey, len, lenerror, length, listOf, listOf, load, lt_b, lt_b, lt_b, lt, lt, lt, lteq_b, lteq_b, lteq_b, lteq, lteq, lteq, metatableOf, metatag, method, method, method, method, method, method, mod, mod, mod, modFrom, mul, mul, mul, narg, neg, neq_b, neq, next, not, onInvoke, optboolean, optclosure, optdouble, optfunction, optint, optinteger, optjstring, optlong, optnumber, optstring, opttable, optthread, optuserdata, optuserdata, optvalue, or, pow, pow, pow, powWith, powWith, presize, raweq, raweq, raweq, raweq, raweq, rawget, rawget, rawget, rawlen, rawset, rawset, rawset, rawset, rawset, rawset, rawset, rawsetlist, set, set, set, set, set, set, set, setmetatable, settable, strcmp, strcmp, strongvalue, strvalue, sub, sub, sub, subargs, subFrom, subFrom, tableOf, tableOf, tableOf, tableOf, tableOf, tableOf, tailcallOf, testfor_b, toboolean, tobyte, tochar, todouble, tofloat, toint, tolong, tonumber, toshort, tostring, toString, touserdata, touserdata, typerror, unimplemented, userdataOf, userdataOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOf
 
Methods inherited from class org.luaj.vm2.Varargs
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkinteger, checkjstring, checklong, checknotnil, checknumber, checkstring, checktable, checkthread, checkuserdata, checkuserdata, checkvalue, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isthread, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optinteger, optjstring, optlong, optnumber, optstring, opttable, optthread, optuserdata, optuserdata, optvalue, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, toshort, touserdata, touserdata, type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IoLib.File

protected IoLib.File()
Method Detail

write

public abstract void write(LuaString string)
                    throws java.io.IOException
Throws:
java.io.IOException

flush

public abstract void flush()
                    throws java.io.IOException
Throws:
java.io.IOException

isstdfile

public abstract boolean isstdfile()

close

public abstract void close()
                    throws java.io.IOException
Throws:
java.io.IOException

isclosed

public abstract boolean isclosed()

seek

public abstract int seek(java.lang.String option,
                         int bytecount)
                  throws java.io.IOException
Throws:
java.io.IOException

setvbuf

public abstract void setvbuf(java.lang.String mode,
                             int size)

remaining

public abstract int remaining()
                       throws java.io.IOException
Throws:
java.io.IOException

peek

public abstract int peek()
                  throws java.io.IOException,
                         java.io.EOFException
Throws:
java.io.IOException
java.io.EOFException

read

public abstract int read()
                  throws java.io.IOException,
                         java.io.EOFException
Throws:
java.io.IOException
java.io.EOFException

read

public abstract int read(byte[] bytes,
                         int offset,
                         int length)
                  throws java.io.IOException
Throws:
java.io.IOException

get

public LuaValue get(LuaValue key)
Description copied from class: LuaValue
Get a value in a table including metatag processing using LuaValue.INDEX.

Overrides:
get in class LuaValue
Parameters:
key - the key to look up, must not be LuaValue.NIL or null
Returns:
LuaValue for that key, or LuaValue.NIL if not found and no metatag
See Also:
LuaValue.get(int), LuaValue.get(String), LuaValue.rawget(LuaValue)

type

public int type()
Description copied from class: LuaValue
Get the enumeration value for the type of this value.

Specified by:
type in class LuaValue
Returns:
value for this type, one of LuaValue.TNIL, LuaValue.TBOOLEAN, LuaValue.TNUMBER, LuaValue.TSTRING, LuaValue.TTABLE, LuaValue.TFUNCTION, LuaValue.TUSERDATA, LuaValue.TTHREAD
See Also:
LuaValue.typename()

typename

public java.lang.String typename()
Description copied from class: LuaValue
Get the String name of the type of this value.

Specified by:
typename in class LuaValue
Returns:
name from type name list LuaValue.TYPE_NAMES corresponding to the type of this value: "nil", "boolean", "number", "string", "table", "function", "userdata", "thread"
See Also:
LuaValue.type()

tojstring

public java.lang.String tojstring()
Description copied from class: LuaValue
Convert to human readable String for any type.

Overrides:
tojstring in class LuaValue
Returns:
String for use by human readers based on type.
See Also:
LuaValue.tostring(), LuaValue.optjstring(String), LuaValue.checkjstring(), LuaValue.isstring(), LuaValue.TSTRING


Copyright © 2007-2015 Luaj.org. All Rights Reserved.