mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
Files, sockets, and process pipes all support reading. Read's result is either `EOF` or some bytes written to a buffer provided to `read`. APIs usually return a number of bytes read with `-1` means EOF, but this information is redundant as it can always be deduced from `ByteBuffer` position. As we do not need this number, we introduce enum which is simpler (and faster) than sealed class and also removes possible inconsistency between number of bytes and buffer position advance. GitOrigin-RevId: cffb7b5121f05c40aec186019ee7c3b0fe400d16