Beispiel #1
0
 public void write(Path path, ByteArrayOutputStream os) throws IOException {
   boolean first = true;
   for (Part p : path.parts) {
     if (!first) {
       path_seperator.writeTo(os);
     }
     new AsciiBuffer(p.toString(this)).writeTo(os);
     first = false;
   }
 }
Beispiel #2
0
 /**
  * Converts the path back to the string representation.
  *
  * @return
  */
 public String toString(Path path) {
   StringBuffer buffer = new StringBuffer();
   boolean first = true;
   for (Part p : path.parts) {
     if (!first) {
       buffer.append(path_seperator);
     }
     buffer.append(p.toString(this));
     first = false;
   }
   return buffer.toString();
 }