[
https://issues.apache.org/jira/browse/TIKA-3614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456396#comment-17456396
]
Tilman Hausherr commented on TIKA-3614:
---------------------------------------
Use {{org.apache.pdfbox.io.IOUtils}} if available (should be part of pdfbox).
Or write something for yourself.
{code}
public static long copy(InputStream input, OutputStream output) throws
IOException
{
byte[] buffer = new byte[4096];
long count = 0;
int n = 0;
while (-1 != (n = input.read(buffer)))
{
output.write(buffer, 0, n);
count += n;
}
return count;
}
{code}
> Trying to upgrade from 1.27 to 2.1.0
> ------------------------------------
>
> Key: TIKA-3614
> URL: https://issues.apache.org/jira/browse/TIKA-3614
> Project: Tika
> Issue Type: New Feature
> Components: build
> Affects Versions: 2.1.0
> Reporter: Vamsi Molli
> Priority: Major
>
> Currently, my application is using the Tika version of 1.27, in the Gradle
> file we wrote like below to download and use Tika components.
> api(group: 'org.apache.tika', name: 'tika-parsers', version: '1.27')
> { // Tika requires a version of jackson that conflicts with other
> dependencies. exclude group: "com.fasterxml.jackson.core" }
> but when trying to update to 2.1.0 with the below code. seeing some of the
> imports are missing.
> import org.apache.tika.config.TikaConfig;
> import org.apache.tika.detect.Detector;
> import org.apache.tika.exception.TikaException;
> import org.apache.tika.io.TikaInputStream;
> import org.apache.tika.metadata.HttpHeaders;
> import org.apache.tika.metadata.Metadata;
> import org.apache.tika.metadata.TikaMetadataKeys;
> import org.apache.tika.mime.MediaType;
> import org.apache.tika.mime.MimeType;
> import org.apache.tika.mime.MimeTypeException;
> import org.apache.tika.parser.AutoDetectParser;
> import org.apache.tika.parser.ParseContext;
> Tried with below, causing the above imports missing.
>
> api(group: 'org.apache.tika', name: 'tika-parsers-standard-package', version:
> '2.1.0')
> { // Tika requires a version of jackson that conflicts with other
> dependencies. exclude group: "com.fasterxml.jackson.core" }
> Please let me know what imports I need to change to fix above issues.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)