Cleaning.

This commit is contained in:
Christian P. MOMON 2010-08-13 10:33:10 +02:00
parent 7d2b3ab393
commit b36e4dfb8d
18 changed files with 99 additions and 89 deletions

View file

@ -18,8 +18,6 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import fr.devinsy.util.StringConcatenator;

View file

@ -6,9 +6,10 @@
*/
package fr.devinsy.util;
import java.io.*;
import java.io.File;
import java.security.*;
import java.io.FileInputStream;
import java.io.InputStream;
import java.security.MessageDigest;
/**

View file

@ -2,7 +2,6 @@ package fr.devinsy.util;
import java.io.File;
import java.util.Iterator;
import java.util.regex.Pattern;
/**

View file

@ -1,6 +1,9 @@
package fr.devinsy.util.cmdexec;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
@ -21,7 +24,9 @@ public class StreamGobbler extends Thread
protected boolean isOverStatus; // Important if the caller wants have complete stream in case of very short command.
//
/**
*
*/
StreamGobbler ()
{
this.type = "";
@ -31,7 +36,11 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @param type
* @param streamWay
*/
StreamGobbler (String type, int streamWay)
{
this.type = type;
@ -41,7 +50,11 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @param is
* @param type
*/
StreamGobbler (InputStream is, String type)
{
this.is = is;
@ -52,7 +65,12 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @param is
* @param type
* @param streamWay
*/
StreamGobbler (InputStream is, String type, int streamWay)
{
this.is = is;
@ -63,14 +81,19 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @param is
*/
public void setInputStream (InputStream is)
{
this.is = is;
}
//
/**
*
*/
public void run ()
{
try
@ -110,7 +133,10 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @return
*/
public String getStream ()
{
String result;
@ -129,7 +155,10 @@ public class StreamGobbler extends Thread
}
//
/**
*
* @return
*/
public boolean isOver ()
{
boolean result;

View file

@ -1,6 +1,9 @@
package fr.devinsy.util.cmdexec;
import java.io.*;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
@ -9,12 +12,8 @@ import java.io.*;
public class Wrapper
{
static private final Wrapper instance = new Wrapper ();
static private org.apache.log4j.Logger logger;
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Wrapper.class);
static
{
logger = org.apache.log4j.Logger.getLogger (Wrapper.class);
}
/**
* return instance of the controller

View file

@ -1,7 +1,6 @@
package fr.devinsy.util.unix;
import java.util.*;
import java.util.Vector;
/**
@ -9,18 +8,9 @@ import java.util.*;
*/
public class EtcGroupFile extends CachedFile
{
static private org.apache.log4j.Logger logger;
static
{
logger = org.apache.log4j.Logger.getLogger (EtcGroupFile.class);
}
static EtcGroupFile instance;
static
{
instance = null;
}
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (EtcGroupFile.class);
static EtcGroupFile instance = null;
protected Groups groups;
/**
@ -164,6 +154,7 @@ public class EtcGroupFile extends CachedFile
return (result);
}
/**
*
*/
@ -180,7 +171,6 @@ public class EtcGroupFile extends CachedFile
}
/**
*
*/

View file

@ -1,7 +1,8 @@
package fr.devinsy.util.unix;
import java.io.*;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
/**

View file

@ -1,7 +1,8 @@
package fr.devinsy.util.unix;
import java.io.*;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
/**

View file

@ -1,7 +1,6 @@
package fr.devinsy.util.unix;
import java.util.*;
import java.util.Vector;
/**
@ -9,12 +8,8 @@ import java.util.*;
*/
public class Group
{
static private org.apache.log4j.Logger logger;
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Group.class);
static
{
logger = org.apache.log4j.Logger.getLogger (Group.class);
}
/*
* /usr/include/grp.h

View file

@ -1,7 +1,7 @@
package fr.devinsy.util.unix;
import java.util.*;
import java.util.Iterator;
import java.util.Vector;
/**
@ -11,12 +11,7 @@ public class Groups extends Vector<Group>
{
private static final long serialVersionUID = 5802487312198869603L;
static private org.apache.log4j.Logger logger;
static
{
logger = org.apache.log4j.Logger.getLogger (Groups.class);
}
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Groups.class);
/**
@ -206,8 +201,7 @@ public class Groups extends Vector<Group>
{
String result;
StringBuffer out;
out = new StringBuffer ();
StringBuffer out = new StringBuffer ();
Iterator<Group> iterator = this.iterator ();

View file

@ -1,17 +1,14 @@
package fr.devinsy.util.unix;
import java.io.File;
import java.util.Vector;
import fr.devinsy.util.StringConcatenator;
import fr.devinsy.util.cmdexec.CmdExec;
import fr.devinsy.util.cmdexec.StreamGobbler;
import fr.devinsy.util.unix.acl.Acl;
import fr.devinsy.util.unix.acl.AclManager;
/**
*
*/
@ -423,6 +420,7 @@ public class Unix
}
}
/**
*
*/
@ -604,4 +602,4 @@ public class Unix
}
}
// ////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////

View file

@ -1,19 +1,12 @@
package fr.devinsy.util.unix;
/**
*
*/
public class User
{
static private org.apache.log4j.Logger logger;
static
{
logger = org.apache.log4j.Logger.getLogger (User.class);
}
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (User.class);
/*
* /usr/include/pwd.h
@ -83,6 +76,7 @@ public class User
return (result);
}
/**
*
*/
@ -96,6 +90,7 @@ public class User
return (result);
}
/**
*
*/
@ -109,6 +104,7 @@ public class User
return (result);
}
/**
*
*/
@ -122,6 +118,7 @@ public class User
return (result);
}
/**
*
*/
@ -135,6 +132,7 @@ public class User
return (result);
}
/**
*
*/
@ -148,6 +146,7 @@ public class User
return (result);
}
/**
*
*/
@ -161,6 +160,7 @@ public class User
return (result);
}
/**
*
*/
@ -174,6 +174,7 @@ public class User
return (result);
}
/**
*
*/
@ -187,6 +188,7 @@ public class User
return (result);
}
/**
*
*/
@ -200,6 +202,7 @@ public class User
return (result);
}
/**
*
*/
@ -213,6 +216,7 @@ public class User
return (result);
}
/**
*
*/
@ -226,6 +230,7 @@ public class User
return (result);
}
/**
*
*/
@ -239,6 +244,7 @@ public class User
return (result);
}
/**
*
*/
@ -265,6 +271,7 @@ public class User
return (result);
}
/**
*
*/
@ -273,6 +280,7 @@ public class User
this.homeDirectory = homeDirectory;
}
/**
*
*/
@ -281,6 +289,7 @@ public class User
this.gid = gid;
}
/**
*
*/
@ -289,6 +298,7 @@ public class User
this.login = login;
}
/**
*
*/
@ -297,6 +307,7 @@ public class User
this.password = password;
}
/**
*
*/
@ -305,6 +316,7 @@ public class User
this.password = password;
}
/**
*
*/
@ -313,6 +325,7 @@ public class User
this.realName = realName;
}
/**
*
*/
@ -321,6 +334,7 @@ public class User
this.shell = shell;
}
/**
*
*/
@ -329,6 +343,7 @@ public class User
this.uid = uid;
}
/**
*
*/

View file

@ -1,7 +1,7 @@
package fr.devinsy.util.unix;
import java.util.*;
import java.util.Iterator;
import java.util.Vector;
/**
@ -10,12 +10,7 @@ import java.util.*;
public class Users extends Vector<User>
{
private static final long serialVersionUID = -7178304512851592399L;
static private org.apache.log4j.Logger logger;
static
{
logger = org.apache.log4j.Logger.getLogger (Users.class);
}
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Users.class);
/**
@ -142,9 +137,6 @@ public class Users extends Vector<User>
}
/**
*
*/

View file

@ -6,7 +6,7 @@ package fr.devinsy.util.unix.acl;
*/
public class Acl
{
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Acl.class);
// static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (Acl.class);
/*
@ -36,6 +36,7 @@ public class Acl
protected AclEntries currentAcl;
protected AclEntries defaultAcl;
/**
*
*/

View file

@ -1,6 +1,5 @@
package fr.devinsy.util.unix.acl;
import java.util.Iterator;
import java.util.Vector;
@ -11,7 +10,7 @@ import java.util.Vector;
public class AclEntries extends Vector<AclEntry>
{
private static final long serialVersionUID = 5802487312198869603L;
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (AclEntries.class);
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (AclEntries.class);
/**
*
@ -176,6 +175,7 @@ public class AclEntries extends Vector<AclEntry>
return(result);
}
/**
*
*/

View file

@ -6,7 +6,7 @@ package fr.devinsy.util.unix.acl;
*/
public class AclEntry
{
static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (AclEntry.class);
//static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (AclEntry.class);
/*

View file

@ -1,11 +1,8 @@
package fr.devinsy.util.web;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.servlet.http.*;
import sun.security.provider.MD5;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**