(newest | oldest) View (newer 50 | older 50) (20 | 50 | 100 | 250 | 500)
- 06:55, 4 December 2010 (diff | hist) . . (+1,351) . . N JavaHowTo FileToStringArray (New page: <source lang="java"> →* * Read string from the file. * @param fileName * @return: public static String[] fileToStringArray(String fileName) { java.io.FileReader fr = null; try { ...) (current)
- 06:54, 4 December 2010 (diff | hist) . . (+501) . . N JavaHowTo FileFromString (New page: <source lang="java"> →* * Append the string to the file. * @param filename * @param text: public static void fileFromString(String filename, String text) { java.io.File file = new ...) (current)
- 06:53, 4 December 2010 (diff | hist) . . (+662) . . N JavaHowTo CountLines (New page: <source lang="java"> →* * Determine the number of text lines in a file. * @param fileName * @return: public static int fileCountLines(String fileName) { int count = 0; java.io.Fil...) (current)
- 06:52, 4 December 2010 (diff | hist) . . (-47) . . JavaHowTo
- 06:49, 4 December 2010 (diff | hist) . . (+476) . . N JavaHowTo WaitFile (New page: <source lang="java"> →* * Wait until the file is ready. * @param filename * @param timeout in millisecond * @return: public static boolean fileWait(String filename, int timeout) { ...) (current)
- 06:48, 4 December 2010 (diff | hist) . . (+340) . . N JavaHowTo CreateDirectory (New page: <source lang="java"> public static void fileCreateDirectory(String dir) { java.io.File f = new java.io.File(dir); if (!f.mkdir()) { Ts.printErr("Fail to create directory: " + dir); } ...) (current)
- 06:47, 4 December 2010 (diff | hist) . . (+459) . . N JavaHowTo CurrentPath (New page: <source lang="java"> public static String fileCurrentDirectory() { return System.getProperty("user.dir"); } public static String fileCurrentDirectory2() { java.io.File f = new java.io.F...) (current)
- 06:46, 4 December 2010 (diff | hist) . . (+448) . . N JavaHowTo UniformError (New page: <source lang="java"> →* * Apply uniform error. * @param stream * @param lossRate it ranges from 0.0 to 1.0 * @param seed: public static void fecUniformError(byte[] stream, double l...) (current)
- 06:35, 4 December 2010 (diff | hist) . . (+682) . . JavaHowTo
- 03:08, 2 December 2010 (diff | hist) . . (+128) . . JavaHowTo ApplyLookAndFeel (current)
- 09:21, 25 November 2010 (diff | hist) . . (+407) . . JavaHowTo ColorConversion (current)
- 05:22, 23 November 2010 (diff | hist) . . (+58) . . User:Han84
- 05:17, 23 November 2010 (diff | hist) . . (+15) . . User:Han84
- 05:15, 23 November 2010 (diff | hist) . . (-99) . . JavaHowTo SimpleTableModel
- 05:15, 23 November 2010 (diff | hist) . . (+4,603) . . N JavaHowTo SimpleTableModel (New page: <source lang="java"> →* * This class is for table model. This class is designed for easy usage. * You don't need to specify the width of table. Just define the head of table.: public...)
- 05:02, 23 November 2010 (diff | hist) . . (+829) . . N JavaHowTo ApplyLookAndFeel (New page: <source lang="java"> →* * Apply look and feel more easily. * This method has to be called at the first line of main method. * @param name: public static void guiSetLookAndFeel(Strin...)
- 05:00, 23 November 2010 (diff | hist) . . (+711) . . N JavaHowTo ColorConversion (New page: <source lang="java"> public static java.awt.Color twoColorFromYUV(byte y, byte u, byte v) { return new java.awt.Color(Ts.twoColorFromYUVInt(y, u, v)); } public static int twoColorFromYUV...)
- 04:58, 23 November 2010 (diff | hist) . . (+657) . . N JavaHowTo InterleaveAndDeinterleave (New page: <source lang="java"> →* * Interleave for FEC. * @param data * @param size * @return: public static byte[] fecInterleave(byte[] data, int size) { byte[] inter = new byte[data.lengt...) (current)
- 04:57, 23 November 2010 (diff | hist) . . (+1,451) . . N JavaHowTo ExecuteExternalProgram (New page: <source lang="java"> /** * This method is used for executing the external program. The dealing with streams is critical. * @param command the program file that this method will execute ...) (current)
- 04:53, 23 November 2010 (diff | hist) . . (+6) . . JavaHowTo ExecutionTimer (current)
- 04:52, 23 November 2010 (diff | hist) . . (+1,537) . . N JavaHowTo PropertyFile (New page: <source lang="java"> /*************************************************************************** * Property * Property file is very useful to store and get the program parameters. ****...) (current)
- 04:50, 23 November 2010 (diff | hist) . . (+1,015) . . N JavaHowTo ExecutionTimer (New page: <source lang="java"> →* * Compute time duration. * This class is generally used for analyzing the performance of the part of the program.: public class ExecutionTimer { private long...)
- 04:45, 23 November 2010 (diff | hist) . . (+1,053) . . N JavaHowTo MathCombination (New page: <source lang="java"> →* * Combination calculation with straightforward way using BigDecimal. "n" choose "k". * @param n * @param k * @return: public static double mathCombination(i...) (current)
- 04:43, 23 November 2010 (diff | hist) . . (+941) . . N JavaHowTo MathFactorial (New page: <source lang="java"> →* * Factorial calculation with straightforward way. * @param num * @return: public static double mathFactorial(int num) { //----- to prevent abnormal result ...) (current)
- 04:40, 23 November 2010 (diff | hist) . . (+329) . . N JavaHowTo ConvertIPToLong (New page: <source lang="java"> public static long convertIpToLong(String addr) { String[] addrArray = addr.split("\\."); long num = 0; for (int i = 0; i < addrArray.length; i++) { int power = 3...) (current)
- 04:38, 23 November 2010 (diff | hist) . . (+232) . . N JavaHowTo ConvertLongToIP (New page: <source lang="java"> public static String convertLongToIp(long num) { return ((num >> 24) & 0xFF) + "." + ((num >> 16) & 0xFF) + "." + ((num >> 8) & 0xFF) + "." + (num & 0xFF); }...) (current)
- 04:37, 23 November 2010 (diff | hist) . . (+1,096) . . N JavaHowTo ConvertUnsignedType (New page: These methods are for JNI (Java Native Interface). <source lang="java"> //================ convert the unsigned byte (written in C) to integer ===== //----- to save the memory, short or c...) (current)
- 04:33, 23 November 2010 (diff | hist) . . (+260) . . N JavaHowTo ConvertIntegerArrayToByteArray (New page: <source lang="java"> public static byte[] convertIntArrayToByteArray(int[] data) { byte[] result = new byte[data.length]; for (int i = 0; i < data.length; i++) { result[i] = (byte) (da...) (current)
- 04:32, 23 November 2010 (diff | hist) . . (+256) . . N JavaHowTo ConvertByteArrayToIntegerArray (New page: <source lang="java"> public static int[] convertByteArrayToIntArray(byte[] data) { int[] result = new int[data.length]; for (int i = 0; i < data.length; i++) { result[i] = data[i] & 0x...) (current)
- 04:32, 23 November 2010 (diff | hist) . . (+396) . . N JavaHowTo ConvertByteToBinary (New page: <source lang="java"> →* * Convert the byte into binary form of string. * @param b * @return: public static String convertByteToBinary(byte b) { StringBuilder result = new StringBui...) (current)
- 04:30, 23 November 2010 (diff | hist) . . (+111) . . JavaHowTo ConvertByteArrayToHex (current)
- 04:29, 23 November 2010 (diff | hist) . . (+511) . . N JavaHowTo ConvertByteArrayToHex (New page: <source lang="java"> →* * Represent the byte array into hex digits. Two hex digits represent one byte. * @param data * @param length * @return: public static String convertByteArra...)
- 04:27, 23 November 2010 (diff | hist) . . (+673) . . N JavaHowTo ConvertObjectToDouble (New page: <source lang="java"> public static double convertObjectToDouble(Object obj) { if (obj.getClass().toString().contains("Double")) { return (Double) obj; } if (obj.getClass().toString()....) (current)
- 04:26, 23 November 2010 (diff | hist) . . (+578) . . N JavaHowTo ConvertObjectToInteger (New page: <source lang="java"> public static int convertObjectToInt(Object obj) { if (obj.getClass().toString().contains("Integer")) { return (Integer) obj; } if (obj.getClass().toString().cont...) (current)
- 04:23, 23 November 2010 (diff | hist) . . (+156) . . N JavaHowTo ConvertStringToDouble (New page: <source lang="java"> public static double convertStringToDouble(String str) { return Double.parseDouble(str); } </source> Back to JavaHowTo) (current)
- 04:22, 23 November 2010 (diff | hist) . . (+148) . . N JavaHowTo ConvertStringToInteger (New page: <source lang="java"> public static int convertStringToInt(String str) { return Integer.parseInt(str); } </source> Back to JavaHowTo) (current)
- 04:21, 23 November 2010 (diff | hist) . . (+1) . . JavaHowTo ConvertDoubleToString (current)
- 04:21, 23 November 2010 (diff | hist) . . (+719) . . N JavaHowTo ConvertDoubleToString (New page: <source lang="java"> public static String convertDoubleToString(double x, int w, int d) { if (Double.isNaN(x)) { return "NaN"; } java.text.DecimalFormat fmt = new java.text.DecimalFor...)
- 04:17, 23 November 2010 (diff | hist) . . (+24) . . JavaHowTo
- 04:16, 23 November 2010 (diff | hist) . . (+1,161) . . N JavaHowTo ConvertFileToObject (New page: <source lang="java"> public static Object convertFileToObject(String filename) { return convertByteArrayToObject(convertFileToByteArray(filename)); } public static byte[] convertFileToBy...) (current)
- 04:13, 23 November 2010 (diff | hist) . . (+1,044) . . N JavaHowTo ConvertObjectToFile (New page: <source lang="java"> public static void convertObjectToFile(Object obj, String filename) { Ts.convertByteArrayToFile(Ts.convertObjectToByteArray(obj), filename); } public static void con...) (current)
- 04:10, 23 November 2010 (diff | hist) . . (+573) . . N JavaHowTo ConvertFileToByteArray (New page: <source lang="java"> public static byte[] convertFileToByteArray(String filename) { java.io.File f = new java.io.File(filename); java.io.FileInputStream fis = null; byte[] stream = new ...) (current)
- 04:09, 23 November 2010 (diff | hist) . . (+528) . . N JavaHowTo ConvertByteArrayToFile (New page: <source lang="java"> public static void convertByteArrayToFile(byte[] stream, String filename) { java.io.File f = new java.io.File(filename); java.io.FileOutputStream fos = null; try { ...) (current)
- 04:08, 23 November 2010 (diff | hist) . . (+85) . . JavaHowTo ConvertByteArrayToObject (current)
- 04:07, 23 November 2010 (diff | hist) . . (+520) . . N JavaHowTo ConvertByteArrayToObject (New page: <source lang="java"> public static Object convertByteArrayToObject(byte[] stream) { java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(stream); java.io.ObjectInputStrea...)
- 04:03, 23 November 2010 (diff | hist) . . (+519) . . N JavaHowTo ConvertObjectToByteArray (New page: <source lang="java"> public static byte[] convertObjectToByteArray(Object obj) { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); java.io.ObjectOutputStream oos ...) (current)
- 03:57, 23 November 2010 (diff | hist) . . (+28) . . JavaHowTo ConvertObjectArrayToStringArray (current)
- 03:54, 23 November 2010 (diff | hist) . . (+248) . . N JavaHowTo ConvertObjectArrayToStringArray (New page: <source lang="java"> public static String[] convertObjectArrayToStringArray(Object[] objArray) { int len = objArray.length; String[] strArray = new String[len]; System.arraycopy(obj...)
- 03:51, 23 November 2010 (diff | hist) . . (+1,982) . . N JavaHowTo (New page: ==Convert== How to convert object array to string array How to convert object to byte array [[JavaHow...)
- 02:43, 23 November 2010 (diff | hist) . . (+13) . . N Java (New page: JavaHowTo) (current)
(newest | oldest) View (newer 50 | older 50) (20 | 50 | 100 | 250 | 500)