L
L
Lenar2016-11-28 15:28:33
Java
Lenar, 2016-11-28 15:28:33

How to display only the desired part of the file on a web page?

There is a text file in which there are several lines that need to be displayed in the web interface, the file itself is on the disk, you need to read the file from one character (note "local") to another (note "}"). Which method to use (indexof, RandomAccessFile or others?) . I started studying Java recently, so I ask you not to scold me much, thank you in advance. Text example:

CONNECT = 20
REPORT = 23
CONTINUE = 31
APPLYCHARGING = 35
REP_APP_CON = 233531
BYPASS_all_SERVICES = "OFF" -- OFF/ON
local SIP_TERM = {
SERVICE_BYPASS = true,
APP_SERVER_TYPE = "HTTP",
APP_SERVER_IP = "999.999.1.8",
IDP_RES = CONNECT ,
ParamRequet = { "CALLING_NUM", "CALLED_NUM"}
}
local ROAM_CHECK = {
SERVICE_BYPASS = true,
APP_SERVER_TYPE = "ORACLE",
APP_SERVER_IP = "RADIUS", --connection settings in /usr/lib/instantclient_12_1/tnsnames.ora
IDP_RES = REP_APP_CON,
ParamRequet = { "CALLING_NUM", "CALLED_NUM"}
}
if BYPASS_all_SERVICES == "ON" then
print("\nContinue")
return 1, 0, CONTINUE -- Send Continue
elseif SIP_TERM.SERVICE_BYPASS == true then
print("\nSIPOnly")
return 2, SIP_TERM.APP_SERVER_IP, SIP_TERM.IDP_RES -- SIPOnly
elseif ROAM_CHECK.SERVICE_BYPASS = = true then
print("\nROAM_CHECK")
return 3, ROAM_CHECK.APP_SERVER_IP, ROAM_CHECK.IDP_RES -- ROAM_CHECK
else
print("No such player") -- if BYPASS is none of the listed
end
Appended Data

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question