| От | Oliver Jowett |
|---|---|
| Тема | Re: OutOfMemory when inserting stream of unknown length |
| Дата | |
| Msg-id | 4125CB6F.5040003@opencloud.com обсуждение исходный текст |
| Ответ на | Re: OutOfMemory when inserting stream of unknown length (Oliver Jowett <oliver@opencloud.com>) |
| Список | pgsql-jdbc |
Oliver Jowett wrote: > Mikko T. wrote: > >> But now the current implementation forces the user of the >> setBinaryStream to buffer all bytes to memory just to know how many >> bytes the stream will actually hold. And after that it can already >> call setBytes thus making the whole setBinaryStream useless when the >> stream length is not known beforehand. > > > Not true -- consider the case where you know the length but the data is > held out of heap (for example, a large NIO buffer or a file on disk). Eh, sorry, I misread your last sentence. Certainly if you don't know the length then you have to buffer internally and setBinaryStream() is of no use. The common case I've seen so far on the list is inserting from a file. It seems much less common to not know the length of your stream ahead of time.. -O
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера