MCPcopy Create free account
hub / github.com/apache/nutch / write

Method write

src/java/org/apache/nutch/metadata/Metadata.java:231–250  ·  view source on GitHub ↗
(DataOutput out)

Source from the content-addressed store, hash-verified

229 }
230
231 public final void write(DataOutput out) throws IOException {
232 out.writeInt(size());
233 String[] values = null;
234 String[] names = names();
235 for (int i = 0; i < names.length; i++) {
236 Text.writeString(out, names[i]);
237 values = _getValues(names[i]);
238 int cnt = 0;
239 for (int j = 0; j < values.length; j++) {
240 if (values[j] != null)
241 cnt++;
242 }
243 out.writeInt(cnt);
244 for (int j = 0; j < values.length; j++) {
245 if (values[j] != null) {
246 Text.writeString(out, values[j]);
247 }
248 }
249 }
250 }
251
252 public final void readFields(DataInput in) throws IOException {
253 int keySize = in.readInt();

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.95
namesMethod · 0.95
_getValuesMethod · 0.95

Tested by

no test coverage detected