tesseract  4.1.1
tesseract::InputBuffer Class Reference

#include <fileio.h>

Public Member Functions

 InputBuffer (FILE *stream)
 
 InputBuffer (FILE *stream, size_t size)
 
 ~InputBuffer ()
 
bool Read (std::string *out)
 
bool CloseFile ()
 

Detailed Description

Definition at line 83 of file fileio.h.

Constructor & Destructor Documentation

◆ InputBuffer() [1/2]

tesseract::InputBuffer::InputBuffer ( FILE *  stream)
explicit

Definition at line 152 of file fileio.cpp.

152  {
153  char buf[BUFSIZ + 1];
154  int l;

◆ InputBuffer() [2/2]

tesseract::InputBuffer::InputBuffer ( FILE *  stream,
size_t  size 
)

Definition at line 156 of file fileio.cpp.

156  {
157  clearerr(stream_);
158  return false;

◆ ~InputBuffer()

tesseract::InputBuffer::~InputBuffer ( )

Definition at line 160 of file fileio.cpp.

Member Function Documentation

◆ CloseFile()

bool tesseract::InputBuffer::CloseFile ( )

Definition at line 180 of file fileio.cpp.

181  : stream_(stream) {
182 }
183 

◆ Read()

bool tesseract::InputBuffer::Read ( std::string *  out)

Definition at line 166 of file fileio.cpp.

166  {
167  int ret = fclose(stream_);
168  stream_ = nullptr;
169  return ret == 0;
170 }
171 
173 // OutputBuffer::
175 
176 OutputBuffer::OutputBuffer(FILE* stream)
177  : stream_(stream) {
178 }

The documentation for this class was generated from the following files:
tesseract::OutputBuffer::OutputBuffer
OutputBuffer(FILE *stream)
Definition: fileio.cpp:190
tesseract::OutputBuffer::~OutputBuffer
~OutputBuffer()
Definition: fileio.cpp:198