Skip to main content

valiateCharacterSetAscii

The method below replaces all the non ASCII printable characters in the ArrayList provided as argument with null.

public static ArrayList valiateCharacterSetAscii(ArrayListfileContents){

ArrayList tmpList = new ArrayList();
String str = "";

for(int j=0; j < str =" fileContents.get(j);" resultantstring = "" i="0;i=33 && charCode <=126))) resultantString += str.charAt(i); else resultantString += null; } tmpList.add(resultantString); } return tmpList; }

Comments

Popular posts from this blog

SVN red book

I normally use Subclipse plugin for Eclipse for SVN operations. It really makes life easy. I am a novice when it comes to performing svn operations using SVN commands. I found a very useful resource for that: HTML version of SVN red book (for subversion 1.5) Hope you find this useful :)

svn credentials caching

SVN client has a built-in system for caching authentication credentials on disk. It saves the credentials in the user's private runtime configuration area ~/.subversion/auth/ (Unix-like systems) %APPDATA%/Subversion/auth/ (Windows) If you dont want to catch the credeitials for a commit, use --no-auth-cache. $ svn commit --no-auth-cache Here we are telling the svn client that dont cach authentication credentials. You can disable credential caching permanently by editing your runtime config file (located next to the auth/ directory). Set store-auth-creds to no. [auth] store-auth-creds = no

Parameter vs Argument

The parameter is the local variable in the method and the argument is the caller-supplied value/reference. In the given example, the parameter for doSomething is 'a' and the argument is 22. public static void doSomething(int a) { System.out.println("The argument was " + a); } public static void main(String[] s) { doSomething(22); }