com.cloudconvert.processor.content.DataExtractingContentPreProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudconvert-java Show documentation
Show all versions of cloudconvert-java Show documentation
CloudConvert is an online file converter API - more than 200 different audio, video, document, ebook, archive, image, spreadsheet and presentation formats supported.
package com.cloudconvert.processor.content;
import java.io.IOException;
import java.io.InputStream;
public class DataExtractingContentPreProcessor implements ContentPreProcessor {
private static final String DATA = "data";
private final DefaultContentPreProcessor defaultContentPreProcessor;
public DataExtractingContentPreProcessor() {
this.defaultContentPreProcessor = new DefaultContentPreProcessor();
}
@Override
public String preProcess(final InputStream inputStream) throws IOException {
final String rawString = defaultContentPreProcessor.preProcess(inputStream);
// Get rid of "data" part
return rawString.substring(8, rawString.length() - 1);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy