id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
209678e7-84e0-47e7-9a87-40c694e79ff0 | public byte[] imageHandler(String relativePath) throws FileNotFoundException{
//This method handles the image request.
String dir = isUserDir(relativePath)? userDir: rootDir;
byte[] imgByte = imageToByte(relativePath, dir);
String header = "HTTP/1.1 200 OK \r\n"
+ getDateString()+ "\r\n"
+ "Content-T... |
f5c213b5-0b7f-4bd1-b22a-63caa9898292 | public static String BadRequestResponse(){
//This method generates the response for bad request
System.out.println("bad request");
String message = "Page Not Found!";
return "HTTP/1.1 400 Bad Request \r\n"
+ getDateString()+ "r\n"
+ "Content-Type:"+"text/html"+"\r\n"
+ "Content-Length:"+message.length()+ ... |
a230ebd2-078f-4f3e-b195-3c87782503b4 | public static String PageNotFoundResponse(){
//This method generates the response for files that are not found.
System.out.println("file not found");
String message = "Page Not Found!";
return "HTTP/1.1 404 Not Found \r\n"
+ getDateString()+ "r\n"
+ "Content-Type:"+"text/html"+"\r\n"
+ "Content-Length:"+... |
95f6311c-5c9d-4e6e-acb9-88357ca9165c | public static String getDateString(){
//This method gets the data string for the current time in the appropriate format.
Date date = new Date();
SimpleDateFormat simpleDateFormat =
new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z", Locale.US);
return simpleDateFormat.format(date);
} |
0b707da5-268c-4562-9387-199fae42ebf3 | public static synchronized void setDir(String root){
//This is a synchronized method to set the rootDirectory.
rootDir = root;
} |
eadd2494-dbe8-473e-851c-4bb8bf7cd29c | public static void main(String[] args) {
System.out.println(reformatPath("/~leffinger/cat.jpg"));
System.out.println(reformatPath("/~leffinger/"));
System.out.println(reformatPath("/courses/"));
} |
c063472e-7f8a-47df-b830-0c04816da778 | public ServerThread(ThreadQueue threadQueue, Socket clientSocket, String rootDir, String userDir){
this.threadQueue = threadQueue;
this.clientSocket = clientSocket;
this.rootDir = rootDir;
this.userDir = userDir;
} |
98e5e682-fc38-4139-93bd-81378a441097 | public void KillYourSelf(){
//This is the method to kill a thread and do the clean up.
try {
//System.out.println("I killed myself");
clientSocket.close();
String error = "HTTP/1.1 404 OK \r\n"
+ "Date: Sun, 10 Feb 2013 18:17:43 GMT\r\n"
+ "Content-Type: text/html\r\n"
+ "Content-Length: 54... |
ff21edd2-95e8-47cf-be3c-64b2b7677452 | public void run(){
//This is the main step to process the request using the HTTPProcessor class
try {
OutputStream raw_out = clientSocket.getOutputStream();
out = new PrintWriter(clientSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(
clientSocket.getInputStream()));
... |
d86f3909-3172-47ee-80ea-c7c12eac938b | public static void main(String[] args) {
// TODO Auto-generated method stub
} |
b41a2620-9239-4642-97f2-82b4cacf18fc | public NewMessage() {
} |
7f0f8d02-01a0-41ad-9a6f-5b92d608ba18 | @Override
public void onMessage(Message message) {
ObjectMessage msg = null;
try {
if (message instanceof ObjectMessage) {
msg = (ObjectMessage) message;
NewsEntity e = (NewsEntity) msg.getObject();
save(e);
}
... |
8a0580bb-2429-4bb1-ad2d-e9a0343cd1c0 | public void save(Object object) {
em.persist(object);
} |
f523182c-8cfe-4e16-a4aa-10168d967b21 | public String getTitle() {
return title;
} |
fbef1ff7-daf2-48f1-aed4-8f00576c994a | public void setTitle(String title) {
this.title = title;
} |
8eed0fe3-06ec-4f52-b8ea-626b3653b8da | public String getBody() {
return body;
} |
78db1639-75cc-4ac4-bdd3-c5955c942c83 | public void setBody(String body) {
this.body = body;
} |
3b981680-719b-46ab-a66e-8713dfcb0573 | public Long getId() {
return id;
} |
fcfac5d3-4406-4636-b15a-419482fd0815 | public void setId(Long id) {
this.id = id;
} |
7e8fb89e-85f6-40be-96c6-5c61517872f4 | @Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
} |
c71acbfb-f15d-4113-a328-31f1591b0b34 | @Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof NewsEntity)) {
return false;
}
NewsEntity other = (NewsEntity) object;
if ((this.id == null && other.id != null... |
38c5a032-63df-4ca7-b35d-d9f9500e6f72 | @Override
public String toString() {
return "ejb.NewsEntity[ id=" + id + " ]";
} |
8a6d2e25-af26-4d1f-92ca-44bb47e9ec62 | @Override
protected EntityManager getEntityManager() {
return em;
} |
264fa1ff-1e5b-4945-aa11-7529f37fb008 | public NewsEntityFacade() {
super(NewsEntity.class);
} |
5f4e72d7-5989-4bec-b799-c0ee54626127 | public AbstractFacade(Class<T> entityClass) {
this.entityClass = entityClass;
} |
502624f8-74e2-4880-8f4b-46a953a7025e | protected abstract EntityManager getEntityManager(); |
18d1cec1-03a4-4ef8-b856-b96f9494e663 | public void create(T entity) {
getEntityManager().persist(entity);
} |
c19e33b5-77cd-42e4-a617-39396c923b51 | public void edit(T entity) {
getEntityManager().merge(entity);
} |
3e6d01c0-71a6-41b2-8f09-cfc816402be7 | public void remove(T entity) {
getEntityManager().remove(getEntityManager().merge(entity));
} |
ff429a1c-136d-4245-b5d4-d088afe91bbf | public T find(Object id) {
return getEntityManager().find(entityClass, id);
} |
0ce98381-a061-4e09-b4d5-27c67105cbe0 | public List<T> findAll() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
} |
d8b6d92c-22cb-4b98-a288-55617496acee | public List<T> findRange(int[] range) {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
javax.persistence.Query q = getEntityManager().createQuery(cq);
q.setMaxResults(range[1] - range[0]);
q.se... |
e6c030fd-4d3a-4a47-b408-e7d1b73b5dc0 | public int count() {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
javax.persistence.criteria.Root<T> rt = cq.from(entityClass);
cq.select(getEntityManager().getCriteriaBuilder().count(rt));
javax.persistence.Query q = getEntityManag... |
bee980cf-878a-448d-90b2-6dab158e4864 | protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String title=request.getParameter("title");
String body=request.getParameter("body");
if... |
c2f89684-212b-461c-b36e-294ab73aaa13 | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} |
5b9163aa-8045-4b0e-b683-a77b5851b0cb | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} |
abd5784e-c628-492f-8e95-68195beea691 | @Override
public String getServletInfo() {
return "Short description";
}// </editor-fold> |
ecffe627-236d-4b73-8be4-bf163adcc62d | protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.getSession(true);
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
/* TODO outpu... |
b09cd1b2-4cab-4bdc-9fcb-c0bd4a58fcab | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} |
dae87f94-13e8-49a4-8a17-09f6b1f8a5ba | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} |
f6b19283-4e77-40e7-b9d5-f3bb0fd3392e | @Override
public String getServletInfo() {
return "Short description";
}// </editor-fold> |
60b3b735-3967-4d32-8901-7ab37000cc87 | @Override
public void sessionCreated(HttpSessionEvent se) {
counter++;
} |
780454fa-f31e-4a87-8707-52a41cc36ae0 | @Override
public void sessionDestroyed(HttpSessionEvent se) {
counter--;
} |
6fb31107-0e7d-4d87-9a95-2971e46e6dd1 | public int getActiveSessionsCount() {
return counter;
} |
f8e6f520-d139-4a96-8422-64114dcad568 | cacheobject(String name, cachedir where)
{
this.name=name;
dir=where;
} |
05788325-d16e-41b6-be44-6fdb19c21baa | cacheobject(String name,cachedir where,String ln,long lm,String ct, String enc,int size)
{
this(name,where);
localname=ln;
date=lastmod=lm;
location=null;
etag=null;
lru=System.currentTimeMillis();
ctype=ct;
encoding=enc;
this.size=size;
httprc=200;
good=true;
} |
55d317d1-0834-4045-8f0c-5eb30ada8ab0 | final public boolean equals(Object o)
{
if(o==null || ! (o instanceof cacheobject)) return false;
cacheobject o1=(cacheobject)o;
return name.equals(o1.getName());
} |
532b7099-82d2-48c6-8b10-18923ac6be07 | final public int hashCode()
{
return name.hashCode();
} |
8a97bd2d-cb6b-4cdb-873f-69dee81995c8 | final public boolean needSave()
{
if(localname!=null) return true;
else
return false;
} |
676b05bd-d8c7-4a53-9f58-4fdb5fb23055 | cacheobject(DataInputStream is, cachedir d,byte version) throws IOException
{
this.dir=d;
name=is.readUTF();
ctype=is.readUTF();
localname=is.readUTF();
location=is.readUTF();
if(location.length()==0) location=null;
size=is.readInt();
httprc=is.readInt();
expires=is.readLong();
date=is.readLong();
lastmod=is... |
7bde5827-1f63-4390-82cc-74d29466c182 | final public void save(DataOutputStream os) throws IOException
{
if(localname==null) return;
os.writeUTF(name);
os.writeUTF(ctype);
os.writeUTF(localname);
if(location!=null) os.writeUTF(location);
else
os.writeUTF("");
os.writeInt(size);
os.writeInt(httprc);
os.writeLong(expires);
os.writeLong(date);
... |
eba0df08-2bf9-4dae-9c53-d45afaabfa9e | final public void make_request(request r, long reload_age,long min_age, long max_age, float percent,long expire_age,long redir_age) throws IOException
{
lru=System.currentTimeMillis();
/* novy objekt */
if(localname==null) { load_object(r); return;}
/* test na expiraci */
if(needRefresh(r,reload_age,min_age,max_... |
d46829bf-1109-478d-941e-27c6e6986568 | final private synchronized File genTmp()
{
File out;
String ld=dir.getLocalDir();
if(ld==null) return null;
while(true)
{
out=new File(ld+(int)(Math.random()*100000000f)+".tmp");
if(!out.exists()) break;
}
return out;
} |
7683b243-08b0-4fee-bc41-72cca30c6545 | final public void compress(int level)
{
if(level<=0) return; /* disabled by cfg */
if(good==false) return; /* partial download */
if(encoding!=null) return; /* compressed! */
if(!ctype.startsWith("text/")) return; /* not text */
if(localname==null || localname.equals(RESERVED)) return;
if(size<=auto_compress) re... |
f752533a-f40e-4cfa-bde9-3ec8a5fde8eb | final public boolean isValid()
{
if(localname==null || localname.equals(RESERVED))
{
if(garbage.gcloglevel>2) System.out.print("NULL filename");
return false;
}
File f=new File( dir.getLocalDir()+localname );
if(!f.isFile())
{
if(garbage.gcloglevel>2) System.out.print("No such file");
retur... |
79a34f48-68b8-4ee6-a3a8-f76d5238106a | final public String getLocalName()
{
return localname;
} |
7f7a0c00-9624-4c68-8089-dc0366b17aba | final public void delete()
{
dir.remove(this);
if(localname==null) return;
new File(dir.getLocalDir()+localname).delete();
localname=null;
} |
f36870b0-0977-4233-bec1-8b1b3975eae9 | final public void clearLocalName()
{
if(localname==null) return;
new File(dir.getLocalDir()+localname).delete();
localname=null;
dir.dirty=true;
} |
94c0509a-b151-49d8-9bce-882c6bc149fd | final public synchronized void regenName()
{
if(localname==null)
{
System.out.println("[INTERNAL_ERR] regenName() called on "+name+" with NULL localname!");
}
localname=genName(name);
dir.dirty=true;
if(encoding==null) return;
if(!localname.endsWith(".gz"))
if(localname.endsWith("_r"))
localn... |
04a46970-81e7-48e4-bd60-7e2b29521604 | final public synchronized String genName(String tmp)
{
File f;
String localdir=dir.getLocalDir();
if(localdir==null) return null;
// System.err.println("in="+name);
int j=tmp.length()-1;
if(j>=0)
{
byte v[];
v=new byte[j+1];
tmp.getBytes(0,j+1,v,0);
/* *********************************... |
c5d768bb-2384-4a28-9151-0779771a8bed | final private void load_object(request r) throws IOException
{
WebConnection wc;
c_miss.incrementAndGet();
if(localname==null) localname=RESERVED; /* prevents from async dir cleaning */
if(ctype==null) ctype="unknown/unknown";
String ln;
r.add_ims(); // do not force full URL caching
dir.dirty=true;
try
{
wc... |
81dcdebd-bfad-440a-a801-3fa4a8087402 | final private void refresh_object(request r) throws IOException
{
WebConnection wc;
dir.dirty=true;
try
{
wc=r.connectToHost();
}
catch (IOException eee)
{
/* check for forced reload error */
if(r.reload && ui.loader_add_reloads>0)
{
/* redir to UI */
r.make_headers(302,"t... |
124964ef-f065-444d-88fe-5ef573f0b8c5 | final public synchronized boolean rename(File from, File to)
{
to.delete();
boolean r=from.renameTo(to);
if(!r && !to.exists()) localname=null;
if(!r) from.delete();
return r;
} |
7bd9fcc2-0faa-45fc-896c-64fe5f9b801d | final private void send_fromcache(request r) throws IOException
{
dir.dirty=true;
long clims;
String et=r.etag;
clims=r.ims;
if(et!=null && et.equals(etag))
{
//System.out.println("[debug] Etag hit!");
clims=date;
}
if(clims>0)
/* possible IMS? */
if(clims>=(lastmod==0?date:lastmod))
... |
5a1b28f5-cfa4-4100-a1cd-ad0bd3ad2fc3 | final private void setInfo(request r)
{
httprc=r.httprc;
ctype=r.ctype;
encoding=r.encoding;
location=r.location;
size=r.ctsize;
lastmod=r.ims;
expires=r.exp;
etag=r.etag;
date=System.currentTimeMillis();
dir.dirty=true;
} |
64401ee4-c170-4fbc-947e-610d147dba9d | final private boolean needRefresh(request r,long reload_age,long min_age, long max_age, float percent,long expire_age,long redir_age)
{
long now=System.currentTimeMillis();
long age=now-date;
/* - test forced reload status */
if(r.reload)
{
if(age>=reload_age)
{
if(trace_refresh==true)
... |
75585692-7664-4a2f-86ae-79cb5948b9ce | final public String toString()
{
return dir.getLocalDir()+name;
} |
60bf95a1-51d2-496b-b3aa-a825703e8450 | final public cachedir getDirectory()
{
return dir;
} |
818779d8-c4c7-4684-8104-ccb8ff3aa54e | final public void setDirectory(cachedir newdir)
{
if(dir==null) throw new IllegalArgumentException("Directory must not be null");
dir=newdir;
} |
d35d4c2c-5e5e-45cf-897e-6a24fe0de28b | final public String getName()
{
return name;
} |
b70ad7d9-9469-4ec6-b3c7-ff1e8b602ca7 | final public void setName(String name)
{
dir.remove(this);
if(name!=null)
{
this.name=name;
dir.putObject(this);
}
} |
060aec18-38af-42b4-92b1-c82121e5e2f9 | final public String getType()
{
return ctype;
} |
a99e4dbf-bc8d-4240-a916-09665d99c98c | final public long getLRU()
{
return lru;
} |
ad77806f-f1fd-4d4f-a33a-28b1b374e85e | final public int getRC()
{
return httprc;
} |
51964f54-c674-4420-9b3f-23674132b4a1 | final public int getSize()
{
return size;
} |
766e187a-52cf-4bf5-a803-234bffe0e4dc | final public long getDate()
{
return date;
} |
9ced7136-b26d-4280-8b3f-954055dbf7b7 | final public long getExp()
{
return expires;
} |
a791422b-5820-4195-80fb-e915ff324eb6 | final void touch()
{
lru=date=System.currentTimeMillis();
dir.dirty=true;
} |
be8cd373-03a2-4c77-bb7c-6456be949669 | final void touchLRU()
{
lru=System.currentTimeMillis();
dir.dirty=true;
} |
679f3853-cf59-4255-8d30-67994b7c3674 | final public boolean isCheckable()
{
if(lastmod==0 && etag==null) return false; else return true;
} |
e2d69afd-8e39-4bad-8750-2c1def086b38 | final public boolean isRedirect()
{
if(location!=null) return true; else return false;
} |
46f4541e-4ef8-4020-b5c3-1904d16176c4 | final public static String printDelta(long delta)
{
long mdelta=delta/60000L; // delta in minutes
if(mdelta>60*24*7*4*12*2) return (mdelta/60/24/365)+"Y";
else
if(mdelta>60*24*7*12) return (mdelta/60/24/30)+"M";
else
if(mdelta>60*24*5*7) return (mdelta/60/24/7)+"w";
else
if(mdelta>60*72) return (mdelta/6... |
c52a06e1-5c97-4c40-8e9c-d67577776756 | ui()
{
if(uiport==0) {
server=null;
loader_add_missing=OFF;
loader_add_reloads=OFF;
return;
}
if(uiadr!=null)
try{
server=new ServerSocket(uiport,10,uiadr);
}
catch(IOException e) {
System.err.println("[SMARTCACHE] ERROR: Cannot bind to my UI port "+uiport+"/"+uiadr.getHostAddress... |
fed67d36-e84e-4270-9a57-c4afaf4dcd58 | public final void run()
{
ThreadGroup clients;
uireq client;
Socket clientSocket;
if(server==null) return;
clients=new ThreadGroup("UI-clients");
Thread.currentThread().setName("UI connection accept");
System.out.println(new Date()+" "+scache.CACHENAME+" UI "+VERSION+" ready on "+uiport+"/"+(uiadr==null... |
ee9ef066-e199-4c92-81bd-d5156c75c4ca | public final static String process(String URL)
{
if(URL.startsWith("/loader/setdepth?"))
{
String t=getparam(URL,"type");
URL=getparam(URL,"depth");
if(t!=null && URL!=null)
{
if(t.equals("add"))
loader_add_depth=URL;
else
loader_refresh_depth=URL;
return "Default dep... |
21dfe536-3b7d-4277-8250-541f70009cfc | public final static String getparam(String URL,String arg)
{
int i1=URL.lastIndexOf(arg+'=');
if(i1==-1) return null;
int i2=URL.indexOf('&',i1);
if(i2==-1) i2=URL.length();
String part=URL.substring(i1+1+arg.length(),i2);
return unescape(part);
} |
d7a47eec-3fa4-42ab-93fe-31f4238ae368 | public final static String escape(String URL)
{
if(URL==null) return "";
StringBuffer result=new StringBuffer(80);
char c;
int l=URL.length();
for(int i=0;i<l;i++)
{
c=URL.charAt(i);
if(ESCAPE.indexOf(c)>-1)
{
result.append('%');
result.append(Integer.toHexString((int)c));
}
else
... |
bd36b2b6-92e2-4b63-9b39-2f9393d74343 | public final static String unescape(String URL)
{
StringBuffer result=new StringBuffer(80);
char c;
int l=URL.length();
for(int i=0;i<l;i++)
{
c=URL.charAt(i);
if(c=='%' && i<l-2)
try
{
c=(char)Integer.valueOf(URL.substring(i+1,i+3),16).intValue();
result.append(c);
i+=2;
}
... |
8b4a0f61-5fcf-43b3-a5da-831485fe0bd3 | final static public String directoryToURL(String dir)
{
String urlpart;
if(dir.startsWith(mgr.cache_dir))
{
dir=dir.substring(mgr.cache_dir.length());
}
if(dir.length()==0) return null;
dir=dir.substring(1);
/* preskocit 2x file-separator */
int i;
i=dir.indexOf(File.separatorChar,0);... |
4571cd5e-581e-43fe-b697-64487b82ff8c | final static HashMap <String,String> load_ldr_queue()
{
HashMap <String, String> result=new HashMap <String, String> (20);
String line;
int i;
StringTokenizer st;
try
{
DataInputStream dis=new DataInputStream(
new BufferedInputStream(
new FileInputStream(loader_queue_fil... |
0cb1d074-97f3-49ec-8273-995a125e54f6 | final static void save_ldr_queue(HashMap <String,String> data) throws IOException
{
DataOutputStream dos=new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(loader_queue_file),4096
)
);
for(Entry <String,String> qitem : data.entrySet())
{
dos.write(... |
514e3237-4775-44a2-b89d-d325434edad1 | final static HashMap <String, String> load_dm_queue()
{
HashMap <String, String> result=new HashMap <String, String> (20);
String line;
int i;
StringTokenizer st;
try
{
DataInputStream dis=new DataInputStream(
new BufferedInputStream(
new FileInputStream(mgr.dmach... |
5e9e3571-1868-4e09-8c9e-38121389701a | final static void save_dm_queue(HashMap <String, String> data) throws IOException
{
if(mgr.dmachine_queue==null) return;
DataOutputStream dos=new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(mgr.dmachine_queue)
)
);
for(String URL : data.values())
{
... |
e1a56eaf-d5df-4a38-943a-b281b1e6dc67 | final static public String text_align(String text,int data)
{
if(text.length()>=data) return text.substring(0,data);
StringBuffer sb=new StringBuffer(data);
sb.append(text);
for(int i=data-text.length();i>0;i--)
sb.append(' ');
return sb.toString();
} |
d1fcf7d3-fc6c-4d00-89b9-80d9ef2d756b | final static private void display_trace_switch(String title,StringBuffer ans,boolean val,int conf)
{
ans.append("<tr><td>");
ans.append(title);
ans.append("</td><td>");
if(val==true)
{
ans.append("<b>ON</b></td><td><a href=\"/trace/set?what=");
ans.append(conf);
ans.appen... |
92f630f2-ac63-4079-98cc-98d44b7f71ce | public final static ArrayList <String> search_buildcache(String dir,int depth,ArrayList <String> v)
{
Thread.yield();
if(v==null) v=new ArrayList <String>(100);
if(depth<0) return v;
File f,d;
f=new File(dir);
String filez[]=f.list();
if(filez==null) return v;
if(filez.length==0) return v;
int rl=mgr.cache_dir... |
8300dab0-e172-4124-874c-4ae2654d8a98 | public final static void search_searchcache(ArrayList <String> cache,String str,StringBuilder ans)
{
String bURL;
str=str.toLowerCase();
for(String s:cache)
{
if(s.substring(s.lastIndexOf(File.separatorChar)).toLowerCase().indexOf(str)>-1)
{
bURL=directoryToURL(s+File.separator... |
f253c0c5-cd51-47a0-a480-e3f58bdf38b2 | public static final void search_savecache(ArrayList <String> cache,int depth,long scan)
{
try
{
DataOutputStream dos=new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(mgr.cache_dir+File.separatorChar+SEARCHCACHE+depth+".tmp"),4096
)
);
dos.writeUTF(SEARCHCACHEMAGIC);
dos.write... |
c75d3f6c-59c6-4413-9fb1-78a14148e6a9 | public static final ArrayList <String> search_loadcache(int depth)
{
ArrayList <String> v;
File f;
long scantime;
long filetime;
String s;
v=null;
f=new File(mgr.cache_dir+File.separatorChar+SEARCHCACHE+depth+".tmp");
if(!f.exists()) return null;
try
{
DataInputStream din=... |
b8302423-e195-4e27-a609-9f11cc099952 | public final static void init() {
if(activeConnections!=null) return;
activeConnections = new HashMap <String, ArrayList <WebConnection>> (30);
cleaner = new ConnectionHandler();
cleaner.setDaemon (true);
cleaner.setName ("Keep alive connection cleaner");
cleaner.start ()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.