@Override public void write(Stream s) throws IOException { super.write(s); s.writeInteger(myChildren.size()); for (Entry child : myChildren) { s.writeEntry(child); } }
public DirectoryEntry(Stream s) throws IOException { super(s); int count = s.readInteger(); myChildren = count == 0 ? new SmartList<Entry>() : new ArrayList<Entry>(count); while (count-- > 0) { unsafeAddChild(s.readEntry()); } }