Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 252 → Rev 255

/DUBwise/trunk/j2me/src/DUBwiseHelper.java
1,5 → 1,18
/***************************************************************
*
* Helper functions for DUBwise
*
* Author: Marcus -LiGi- Bueschleb
* Mailto: LiGi @at@ LiGi DOTT de
*
***************************************************************/
 
import java.util.Vector;
import java.io.*;
import javax.microedition.io.*;
 
 
 
public final class DUBwiseHelper
{
public final static String ip_digit_zeroes(int digit)
26,6 → 39,48
}
 
 
 
 
public final static String get_http_string(String url)
{
try {
 
InputStream stream = null;
StringBuffer buff = new StringBuffer();
StreamConnection conn=null;
System.out.println("starting conn");
conn = (StreamConnection)Connector.open(url);
stream = conn.openInputStream();
int ch;
while((ch = stream.read()) != -1)
buff.append((char) ch);
if(stream != null)
stream.close();
if(conn != null)
conn.close();
return buff.toString();
}
catch ( Exception e)
{
return "err";
}
}
 
 
 
public final static int pow(int val,int pow)
{
int res=1;
37,6 → 92,9
}
 
 
 
 
 
public final static String[] split_str(String str,String sep)
{