text
stringlengths
3
1.18M
package pxb.android.axml; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import ...
/* * Copyright (c) 2009-2012 Panxiaobo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* * Copyright (c) 2009-2012 Panxiaobo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* * Copyright (c) 2009-2013 Panxiaobo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* * Copyright (c) 2009-2012 Panxiaobo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* * Copyright (c) 2009-2013 Panxiaobo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.db; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; /** * Hibernate Utility class with a convenient method to get Session Factory object. * * @author liw */ pu...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.db; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; /** * * @author liw */ public class VocabularyHelper { Session session = nu...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.jsf.bean; import java.util.Iterator; import java.util.List; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import org.hibernate.Query; import org.hibernate.Session; import or...
package wli.hibernate.util; import java.util.List; import java.util.Iterator; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import wli.hibernate.util.HibernateUtil; import wli.hibernate.java.*; public class DatabaseInstall { public Long save...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFacto...
package wli.java.file.util; import static org.junit.Assert.*; import java.util.Enumeration; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.db.Word; import wli.hibernate.util.HibernateUtil; public cla...
package wli.java.file.util; import java.net.*; public class FileStructure implements java.io.Serializable, Comparable<FileStructure> { /** * */ private static final long serialVersionUID = 1L; private int id; private int pid; private String ufid; private String path; private String name; ...
package wli.java.file.util; import static org.junit.Assert.*; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import org.junit.Test; public class DirectoryUtilTest { @Test public void testShowFiles() { File f = new File("C:\\Apache\\htdoc...
package wli.java.file.util; import java.io.BufferedOutputStream; import java.io.BufferedWriter; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.ObjectOutputStream; public class FileWriterUtil { pr...
package wli.java.file.util; import java.util.*; public class LinkedListExample { public static void main(String[] args) { System.out.println("Linked List Example!"); LinkedList<Integer> list = new LinkedList<Integer>(); int num1 = 11, num2 = 22, num3 = 33, num4 = 44; int size; Iterator iterator; ...
package wli.java.file.util; import java.io.File; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Vector; import java.net.URI; import java.net.URISyntaxException; public class FileDirectoryToHtmlList { private String directory;...
package wli.java.file.util; import static org.junit.Assert.*; import java.io.IOException; import java.util.Properties; import org.junit.Test; public class FileLoadUtilTest { @Test public void test() throws IOException { FileLoadUtil flut = new FileLoadUtil(); flut.setFileName("FileSystem.proper...
package wli.java.file.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory...
package wli.java.file.util; public class DirectoryStructure { DirectoryStructure parent; String owner; String type; String access; public DirectoryStructure(DirectoryStructure parent, String owner, String type, String access) { this.parent = parent; this.owner = owner; this.type = type; this....
package wli.java.file.util; import static org.junit.Assert.*; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.Befor...
package wli.java.file.util; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Vector; public class TextFileReader { private String filename; private StringBuffer content; private Vector<Strin...
package wli.java.file.util; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class FileLoadUtil { String fileName; public void setFileName(String file_name) { fileName = file_name; } ...
package wli.java.file.util; import java.io.File; import java.util.ArrayList; import java.util.List; public class DirectoryUtil { private ArrayList<FileStructure> list = new ArrayList<FileStructure>(); private int mm = 0; private String base_dir; public DirectoryUtil(String dir) { base_dir = dir; ...
package wli.java.security.util; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Md5Encryption { private static String convertedToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < da...
package wli.web.util; import java.util.Enumeration; import java.util.Vector; public class HtmlUtil { public static StringBuffer getSelect(String default_value, String name, Vector v, String selected) { StringBuffer sb = new StringBuffer(); sb.append("\n<select name=" + name + " size=1 style='font-size:8...
package wli.web.util; import java.util.Calendar; import java.util.Enumeration; import java.util.Locale; import java.util.TimeZone; import java.util.Vector; public class DateAndTimeUtil { public static String getCurrentDate() { Locale lc = Locale.getDefault(); TimeZone tz = TimeZone.getDefault(); Ca...
package wli.web.util; public class TextToHtml { StringBuffer sbf; public StringBuffer textToHtml(String input) { System.out.println("\n\n\n"+input+"\n\n\n"); sbf = new StringBuffer (); if(input == null || input.equals("null") || input.length()<1) { } else { if (input.indexOf("<") !...
package wli.web.util; import java.util.*; public class MyDateAndTime { public static String getCurrentDate() { Locale lc = Locale.getDefault(); TimeZone tz = TimeZone.getDefault(); Calendar c = Calendar.getInstance(tz, lc); return((c.get(Calendar.MONTH)+1)+"/"+c.get(Calendar.DATE)+"/"+c.get(Cal...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.Iterator; import java.util.List; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax....
package wli.web.servlet; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Enumeration; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.htt...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.servlet.Reques...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.servlet.ServletConfig; import javax.servlet.ServletExcep...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.security.NoSuchAlgorithmException; import java.util.HashSet; import java.util.Set; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import ja...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Vector; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import ja...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Htt...
package wli.web.servlet; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.Itera...
package wli.web.listener; import java.net.URL; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import wli.hibernate.util.*; /** * Applicati...
package wli.hibernate.db; import static org.junit.Assert.*; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.util.HibernateUtil; public class WordTest { @Test public void test() { Word wd = new Wo...
package wli.hibernate.db; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; impor...
package wli.hibernate.db; import static org.junit.Assert.*; import java.util.Enumeration; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.util.HibernateUtil; import wli.java.file.util.TextFileReader; ...
package wli.hibernate.util; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.db.*; public class EventTest { @Test public void testEventDateString() { Event evt = new Event(); evt.setId(1); evt.se...
package wli.hibernate.util; import static org.junit.Assert.*; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.db.Event; public class HibernateUtilTest { @Test public void testGetSessionFactory() { ...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory f...
package wli.hibernate; import static org.junit.Assert.*; import java.util.Iterator; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.After; import org.junit.Before; import org.juni...
package wli.hibernate; import static org.junit.Assert.*; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.util.HashSet; import java.util.Set; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; imp...
package wli.net.util; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.StringTokenizer; import java.util.Vector; public class HttpConnector { private...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.db; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; /** * Hibernate Utility class with a convenient method to get Session Factory object. * * @author wli */ pu...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.db; import java.util.List; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; /** * * @author wli */ @ManagedBean @SessionScoped public class VocabularyController { priv...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.db; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; /** * * @author wli */ public class VocabularyHelper { Session session = ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dvdrental; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; /** * * @author wli */ public class FilmHelper { Session session = null; public FilmHelper() { th...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dvdrental; import java.util.List; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; /** * * @author wli *...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dvdrental; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; /** * Hibernate Utility class with a convenient method to get Session Factory object. * * @author wli */ pub...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; /** * * @a...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; /** * * @author liw */ public class AccountHelper { Session session = null; public AccountHelper() ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.util.Date; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; /** * * @author ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; /** * * @author wli */ public class WordHelper { Session session = null; public WordHelper() { ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.util.Date; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; /** * * @author wli */ public class SpellingStudyHel...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; /** * Hibernate Utility class with a convenient method to get Session Factory object. * * @author wli ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; /** * * @a...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; /** * * @author wli */ public clas...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.db; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; /** * * @author liw */ @ManagedBean @SessionScoped public class AccountController { /** Creates a new instanc...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.web.java.file; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Vector; /** * * @author wli...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.java.db; import java.util.List; import org.hibernate.Query; import org.hibernate.classic.Session; /** * * @author liw */ public class AssetHelper { Session session = null; public AssetHelper() ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.java.db; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.ListDataModel; /** * * @author liw */ @ManagedBean @Sessi...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.java.db; import java.util.ArrayList; import java.util.List; import java.util.Iterator; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.Session; /** * * @author liw */ publ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.java.db; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.SessionFactory; /** * Hibernate Utility class with a convenient method to get Session Factory object. * * @author liw */ p...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wli.java.db; import java.io.Serializable; import java.util.ArrayList; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.model.DataModel; import javax.faces.model.List...
package wli.sp.mvc; import java.text.DateFormat; import java.util.Date; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.spr...
package wli.hibernate.util; import java.util.List; import java.util.Iterator; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import wli.hibernate.util.HibernateUtil; import wli.hibernate.java.*; public class DatabaseInstall { public Long save...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFacto...
package wli.hibernate.util; import java.util.List; import java.util.Iterator; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import wli.hibernate.util.HibernateUtil; import wli.hibernate.java.*; public class DatabaseInstall { public Long save...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFacto...
package com.wli.user.action; public class WelcomeUserAction{ private String username; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } // all struts logic here public String execute() { return "SUCCESS"; } ...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory...
package wli.java.security.util; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Md5Encryption { private static String convertedToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < da...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory...
package wli.hibernate.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory...
package wli.java.file.util; import static org.junit.Assert.*; import java.util.Enumeration; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import wli.hibernate.db.Word; import wli.hibernate.util.HibernateUtil; public cla...
package wli.java.file.util; import java.net.*; public class FileStructure implements java.io.Serializable, Comparable<FileStructure> { /** * */ private static final long serialVersionUID = 1L; private int id; private int pid; private String ufid; private String path; private String name; ...
package wli.java.file.util; import static org.junit.Assert.*; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import org.junit.Test; public class DirectoryUtilTest { @Test public void testShowFiles() { File f = new File("C:\\Apache\\htdoc...
package wli.java.file.util; import java.io.BufferedOutputStream; import java.io.BufferedWriter; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.ObjectOutputStream; public class FileWriterUtil { pr...
package wli.java.file.util; import java.util.*; public class LinkedListExample { public static void main(String[] args) { System.out.println("Linked List Example!"); LinkedList<Integer> list = new LinkedList<Integer>(); int num1 = 11, num2 = 22, num3 = 33, num4 = 44; int size; Iterator iterator; ...
package wli.java.file.util; import java.io.File; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Vector; import java.net.URI; import java.net.URISyntaxException; public class FileDirectoryToHtmlList { private String directory;...
package wli.java.file.util; import static org.junit.Assert.*; import java.io.IOException; import java.util.Properties; import org.junit.Test; public class FileLoadUtilTest { @Test public void test() throws IOException { FileLoadUtil flut = new FileLoadUtil(); flut.setFileName("FileSystem.proper...
package wli.java.file.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory...
package wli.java.file.util; public class DirectoryStructure { DirectoryStructure parent; String owner; String type; String access; public DirectoryStructure(DirectoryStructure parent, String owner, String type, String access) { this.parent = parent; this.owner = owner; this.type = type; this....
package wli.java.file.util; import static org.junit.Assert.*; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.Befor...
package wli.java.file.util; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Vector; public class TextFileReader { private String filename; private StringBuffer content; private Vector<Strin...
package wli.java.file.util; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class FileLoadUtil { String fileName; public void setFileName(String file_name) { fileName = file_name; } ...
package wli.java.file.util; import java.io.File; import java.util.ArrayList; import java.util.List; public class DirectoryUtil { private ArrayList<FileStructure> list = new ArrayList<FileStructure>(); private int mm = 0; private String base_dir; public DirectoryUtil(String dir) { base_dir = dir; ...
package wli.java.security.util; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Md5Encryption { private static String convertedToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < da...
package wli.web.util; public class HtmlUtil { }
package wli.web.util; public class TextToHtml { StringBuffer sbf; public StringBuffer textToHtml(String input) { System.out.println("\n\n\n"+input+"\n\n\n"); sbf = new StringBuffer (); if(input == null || input.equals("null") || input.length()<1) { } else { if (input.indexOf("<") !...
package wli.web.util; import java.util.*; public class MyDateAndTime { public static String getCurrentDate() { Locale lc = Locale.getDefault(); TimeZone tz = TimeZone.getDefault(); Calendar c = Calendar.getInstance(tz, lc); return((c.get(Calendar.MONTH)+1)+"/"+c.get(Calendar.DATE)+"/"+c.get(Cal...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.Iterator; import java.util.List; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax....
package wli.web.servlet; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Enumeration; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.htt...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.servlet.Reques...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServl...
package wli.web.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.servlet.ServletConfig; import javax.servlet.ServletExcep...