/** * Submits a request to droid. * @param entry the arc entry to submit * @param entryName the name of the entry * @param parentName the name of the parent file * @param in the archive input stream * @param correlationId the correlation Id for the request * @param originatorNodeId the Id of the originator node * @throws IOException if the input stream could not be read */ final void submit(WarcRecord entry, String entryName, URI parentName, InputStream in, ResourceId correlationId, long originatorNodeId) throws IOException { WarcHeader header = entry.header; long size = header.contentLength; Date time = header.warcDate; RequestMetaData metaData = new RequestMetaData( size == -1 ? null : size, time == null ? null : time.getTime(), entryName); super.submit(WEB_ARCHIVE_TYPE, metaData, parentName, entry.getPayloadContent(), correlationId, originatorNodeId); }
/** * Submits a request to droid. * @param entry the arc entry to submit * @param entryName the name of the entry * @param parentName the name of the parent file * @param in the archive input stream * @param correlationId the correlation Id for the request * @param originatorNodeId the Id of the originator node * @throws IOException if the input stream could not be read */ final void submit(WarcRecord entry, String entryName, URI parentName, InputStream in, ResourceId correlationId, long originatorNodeId) throws IOException { WarcHeader header = entry.header; long size = header.contentLength; Date time = header.warcDate; RequestMetaData metaData = new RequestMetaData( size == -1 ? null : size, time == null ? null : time.getTime(), entryName); super.submit(WEB_ARCHIVE_TYPE, metaData, parentName, entry.getPayloadContent(), correlationId, originatorNodeId); }
byte[] buffer = IOUtils.toByteArray(record.getPayloadContent()); Class<?> encodingDetectorClass = conf.getClass("dkpro.input.encodingdetector", DummyEncodingDetector.class); try {
IdentificationRequest warcRequest = factory.newRequest(metaData, identifier); ByteCountingPushBackInputStream in = (ByteCountingPushBackInputStream) record.getPayloadContent();