
nl.weeaboo.lua2.stdlib.FileBufferMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of luajpp2-core Show documentation
Show all versions of luajpp2-core Show documentation
Fork of LuaJ with added serialization support
package nl.weeaboo.lua2.stdlib;
import java.io.IOException;
import nl.weeaboo.lua2.io.LuaSerializable;
@LuaSerializable
enum FileBufferMode {
NO("no"),
LINE("line"),
FULL("full");
private final String luaMode;
private FileBufferMode(String luaMode) {
this.luaMode = luaMode;
}
public static FileBufferMode fromString(String mode) throws IOException {
for (FileBufferMode value : values()) {
if (value.luaMode.equals(mode)) {
return value;
}
}
throw new IOException("Invalid file buffer mode: " + mode);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy