Differences From Artifact [dce22ba2cb]:
- File
src/OFStream.h
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 39288) [annotate] [blame] [check-ins using]
To Artifact [fc84511d6f]:
- File src/OFStream.h — part of check-in [c8f7b90082] at 2017-07-22 20:50:27 on branch trunk — Split OFDataArray into OFData and OFMutableData (user: js, size: 39165) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | #endif OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFStream; | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #endif OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFStream; @class OFData; @class OFException; #if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_BLOCKS) /*! * @brief A block which is called when data was read from the stream. * * @param stream The stream on which data was read |
︙ | ︙ | |||
519 520 521 522 523 524 525 | * @return The number of bytes read */ - (size_t)readLittleEndianDoublesIntoBuffer: (double *)buffer count: (size_t)count; /*! * @brief Reads the specified number of items with an item size of 1 from the | | | | | | | | | | | | | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | * @return The number of bytes read */ - (size_t)readLittleEndianDoublesIntoBuffer: (double *)buffer count: (size_t)count; /*! * @brief Reads the specified number of items with an item size of 1 from the * stream and returns them as OFData. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * * @param count The number of items to read * @return OFData with count items. */ - (OFData *)readDataWithCount: (size_t)count; /*! * @brief Reads the specified number of items with the specified item size from * the stream and returns them as OFData. * * @warning Only call this when you know that enough data is available! * Otherwise you will get an exception! * * @param itemSize The size of each item * @param count The number of items to read * @return OFData with count items. */ - (OFData *)readDataWithItemSize: (size_t)itemSize count: (size_t)count; /*! * @brief Returns OFData with all the remaining data of the stream. * * @return OFData with an item size of 1 with all the data of the stream until * the end of the stream is reached. */ - (OFData *)readDataUntilEndOfStream; /*! * @brief Reads a string with the specified length from the stream. * * If `\0` appears in the stream, the string will be truncated at the `\0` and * the rest of the bytes of the string will be lost. This way, reading from the * stream will not break because of a `\0` because the specified number of |
︙ | ︙ | |||
971 972 973 974 975 976 977 | * @param count The number of doubles to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianDoubles: (const double *)buffer count: (size_t)count; /*! | | | | | 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 | * @param count The number of doubles to write * @return The number of bytes written to the stream */ - (size_t)writeLittleEndianDoubles: (const double *)buffer count: (size_t)count; /*! * @brief Writes OFData into the stream. * * @param data The OFData to write into the stream * @return The number of bytes written */ - (size_t)writeData: (OFData *)data; /*! * @brief Writes a string into the stream, without the trailing zero. * * @param string The string from which the data is written to the stream * @return The number of bytes written */ |
︙ | ︙ |