Skip to content

Commit 809d783

Browse files
committed
Merge branch 'patch-1' of https://github.com/bjrne/tika-python into merge-pr354
2 parents 101e778 + dc99116 commit 809d783

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,15 @@ print(translate.from_file('/path/to/spanish', 'es', 'en'))
208208
Using a Buffer
209209
--------------
210210
Note you can also use a Parser and Detector
211-
.from_buffer(string) method to dynamically parser
212-
a string buffer in Python and/or detect its MIME
211+
.from_buffer(string|BufferedIOBase) method to dynamically parser
212+
a string or bytes buffer in Python and/or detect its MIME
213213
type. This is useful if you've already loaded
214214
the content into memory.
215+
```python
216+
string_parsed = parser.from_buffer('Good evening, Dave')
217+
byte_data: bytes = b'B\xc3\xa4ume'
218+
parsed = parser.from_buffer(io.BytesIO(byte_data))
219+
```
215220

216221
Using Client Only Mode
217222
----------------------

0 commit comments

Comments
 (0)