aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/api_docs/cc/ClassRandomAccessFile.md
blob: b3647db7c74c13ff2b44e4244a25ab7667908ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Class tensorflow::RandomAccessFile <a class="md-anchor" id="AUTOGENERATED-class-tensorflow--randomaccessfile"></a>

A file abstraction for randomly reading the contents of a file.



##Member Summary <a class="md-anchor" id="AUTOGENERATED-member-summary"></a>

* [tensorflow::RandomAccessFile::RandomAccessFile](#tensorflow_RandomAccessFile_RandomAccessFile)
* [virtual tensorflow::RandomAccessFile::~RandomAccessFile](#virtual_tensorflow_RandomAccessFile_RandomAccessFile)
* [virtual Status tensorflow::RandomAccessFile::Read](#virtual_Status_tensorflow_RandomAccessFile_Read)
  * Reads up to &quot;n&quot; bytes from the file starting at &quot;offset&quot;.

##Member Details <a class="md-anchor" id="AUTOGENERATED-member-details"></a>

#### tensorflow::RandomAccessFile::RandomAccessFile() <a class="md-anchor" id="tensorflow_RandomAccessFile_RandomAccessFile"></a>





#### virtual tensorflow::RandomAccessFile::~RandomAccessFile() <a class="md-anchor" id="virtual_tensorflow_RandomAccessFile_RandomAccessFile"></a>





#### virtual Status tensorflow::RandomAccessFile::Read(uint64 offset, size_t n, StringPiece *result, char *scratch) const =0 <a class="md-anchor" id="virtual_Status_tensorflow_RandomAccessFile_Read"></a>

Reads up to &quot;n&quot; bytes from the file starting at &quot;offset&quot;.

&quot;scratch[0..n-1]&quot; may be written by this routine. Sets &quot;*result&quot; to the data that was read (including if fewer than &quot;n&quot; bytes were successfully read). May set &quot;*result&quot; to point at data in &quot;scratch[0..n-1]&quot;, so &quot;scratch[0..n-1]&quot; must be live when &quot;*result&quot; is used.

On OK returned status: &quot;n&quot; bytes have been stored in &quot;*result&quot;. On non-OK returned status: [0..n] bytes have been stored in &quot;*result&quot;.

Returns OUT_OF_RANGE if fewer than n bytes were stored in &quot;*result&quot; because of EOF.

Safe for concurrent use by multiple threads.