private TextExtractor(ReadOnlyMemory <byte> bytes) { _stream = new MemoryStream(bytes.GetUnderlyingArray().Array); _contentType = ContentTypeExtractor.Extract(bytes); _disposeStream = true; }
private TextExtractor(byte[] bytes) { _stream = new MemoryStream(bytes); _contentType = ContentTypeExtractor.Extract(bytes); _disposeStream = true; }
private TextExtractor(string filePath) { _stream = File.OpenRead(filePath); _contentType = ContentTypeExtractor.Extract(Path.GetFileName(filePath)); _disposeStream = true; }
private TextExtractor(Stream stream) { _stream = stream; _contentType = ContentTypeExtractor.Extract(stream); _disposeStream = false; }
private TextExtractor(FileStream fileStream) { _stream = fileStream; _contentType = ContentTypeExtractor.Extract(fileStream.Name); _disposeStream = false; }