List of utility methods to do Vector Create
Vector | createVector(Object[] array) create Vector Vector v = new Vector(); for (int i = 0; i < array.length; ++i) v.addElement(array[i]); return v; |
Vector | makeVector(String[] O) make Vector final Vector V = new Vector(); if (O != null) for (final String element : O) V.addElement(element); return V; |
boolean | parseLinesFromLast(byte[] bytearray, int lineCount, Vector lastNlines) Given a byte array this method: a. String lastNChars = new String(bytearray); StringBuffer sb = new StringBuffer(lastNChars); lastNChars = sb.reverse().toString(); StringTokenizer tokens = new StringTokenizer(lastNChars, "\n"); while (tokens.hasMoreTokens()) { StringBuffer sbLine = new StringBuffer((String) tokens.nextToken()); lastNlines.add(sbLine.reverse().toString()); if (lastNlines.size() == lineCount) { ... |
String[] | tokenVector(String s, String delimiters) token Vector return tokenArray(new StringTokenizer(s, delimiters)); |
Vector | ToVector(byte[] in) To Vector if (in == null) return null; Vector v = new Vector(); for (int i = 0, s = in.length; i < s; i++) v.addElement(new Byte(in[i])); return v; |
Vector | toVector(Enumeration pEnumeration_) Enumeration to Vector converter. Vector vRetVal = new Vector(); if (pEnumeration_ == null) { return vRetVal; while (pEnumeration_.hasMoreElements()) { vRetVal.addElement(pEnumeration_.nextElement()); return vRetVal; ... |
Vector | toVector(Object[] array) to Vector Vector vector = new Vector(); return addArray(vector, array); |
Vector | toVector(T[] array) Creates a vector and fills it with the elements of the specified array. if (array == null) { return new Vector<T>(); } else { Vector<T> vector = new Vector<T>(array.length); for (int i = 0; i < array.length; i++) { vector.addElement(array[i]); return vector; ... |