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

Method writeRead

src/test/org/apache/nutch/metadata/TestMetadata.java:267–278  ·  view source on GitHub ↗
(Metadata meta)

Source from the content-addressed store, hash-verified

265 }
266
267 private Metadata writeRead(Metadata meta) {
268 Metadata readed = new Metadata();
269 try {
270 ByteArrayOutputStream out = new ByteArrayOutputStream();
271 meta.write(new DataOutputStream(out));
272 readed.readFields(new DataInputStream(new ByteArrayInputStream(out
273 .toByteArray())));
274 } catch (IOException ioe) {
275 fail(ioe.toString());
276 }
277 return readed;
278 }
279
280}

Callers 2

testWriteNonNullMethod · 0.95
testWritableMethod · 0.95

Calls 3

readFieldsMethod · 0.95
writeMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected