/** * Constructs an <tt>ARCSplit</tt> for {@link ARCResource}s whose locations are known. * * @param resources the {@link ARCResource}s for this split's ARC files * @param hosts the hosts that the resources are located on */ public ARCSplit(ARCResource[] resources, String[] hosts) { this.resources = resources; this.hosts = hosts; for (ARCResource resource : resources) { size += resource.getSize(); } }
/** @inheritDoc */ public void write(DataOutput out) throws IOException { out.writeInt(resources.length); for (ARCResource resource : resources) { resource.write(out); } out.writeLong(size); // The hosts are only used on the client side, so don't serialize them }