public Optional <InputStream> tryGetInputStream(string name) { var entry = _zipFile[name]; if (entry == null) { return(Optional.empty <InputStream>()); } else { return(Optional.of(ToJava.StreamToInputStream(entry.OpenReader()))); } }
internal InputStream openStream() { try { var response = WebRequest.Create(_url).GetResponse(); try { return(ToJava.StreamToInputStream(response.GetResponseStream())); } catch { response.Close(); throw; } } catch (System.UriFormatException) { return(ToJava.StreamToInputStream(System.IO.File.OpenRead(_url))); } catch (System.Net.WebException exception) { throw new java.io.IOException(exception.Message); } }
public IResult <string> ExtractRawText(Stream stream) { return(new InternalDocumentConverter(options) .extractRawText(ToJava.StreamToInputStream(stream)) .ToResult()); }
public IResult <string> ConvertToHtml(Stream stream) { return(new InternalDocumentConverter(options) .convertToHtml(ToJava.StreamToInputStream(stream)) .ToResult()); }