{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/3718","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/3718/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/3718/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/3718/events","html_url":"https://github.com/arduino/Arduino/issues/3718","id":102550312,"number":3718,"title":"[DOC] Clarification of Stream methods' availability  in objects from derived libraries","user":{"login":"q2dg","id":7274874,"avatar_url":"https://avatars.githubusercontent.com/u/7274874?v=3","gravatar_id":"","url":"https://api.github.com/users/q2dg","html_url":"https://github.com/q2dg","followers_url":"https://api.github.com/users/q2dg/followers","following_url":"https://api.github.com/users/q2dg/following{/other_user}","gists_url":"https://api.github.com/users/q2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/q2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/q2dg/subscriptions","organizations_url":"https://api.github.com/users/q2dg/orgs","repos_url":"https://api.github.com/users/q2dg/repos","events_url":"https://api.github.com/users/q2dg/events{/privacy}","received_events_url":"https://api.github.com/users/q2dg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-22T16:47:48Z","updated_at":"2015-08-22T21:18:43Z","closed_at":null,"body":"Hello. I read in https://www.arduino.cc/en/Reference/Stream that Stream object is the base of several other objects (namely, five: Serial, SD, Wire, EthernetServer and EthernetClient) and it has several methods (find(), findUntil(), readBytes(), readBytesUntil(), readString(), readStringUntil(), peek(), parseInt(), parseFloat(), setTimeout()...) which are only mentioned there and in Serial's page (https://www.arduino.cc/en/Reference/Serial) but not in the other four ones (SD, Wire, EthernetServer, EthernetClient). So, it isn't clear if it is possible to use all Stream methods as SD/EthernetServer/etc methods. I mean, for instance,could I write this?\r\n\r\n    #include <SPI.h>\r\n    #include <Ethernet.h>\r\n    byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; \r\n    byte ip[] = { 192, 168, 1, 177 };                                       \r\n    EthernetServer myserver(23); \r\n    EthernetClient myclient;       \r\n    boolean found;\r\n    void setup() {\r\n\t    Ethernet.begin(mac, ip);                                    \r\n\t    myserver.begin();                                             \r\n\t    Serial.begin(9600);\r\n    }\r\n    void loop() {\r\n  \t    myclient = myserver.available();   \r\n\t    if (myclient > 0) {                              \r\n\t \t   found=myclient.find(\"astring\");\r\n\t \t   Serial.println(found);\r\n\t    }\r\n    }\r\n\r\nIt compiles but I have'nt right now a Ethernet Shield to check if this sketch works as it should: it isn't clear from documentation. \r\n\r\nIn conclusion: I think Stream and derived/related pages need a big rewrite to clarify/arrange this.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/133755429","html_url":"https://github.com/arduino/Arduino/issues/3718#issuecomment-133755429","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/3718","id":133755429,"user":{"login":"q2dg","id":7274874,"avatar_url":"https://avatars.githubusercontent.com/u/7274874?v=3","gravatar_id":"","url":"https://api.github.com/users/q2dg","html_url":"https://github.com/q2dg","followers_url":"https://api.github.com/users/q2dg/followers","following_url":"https://api.github.com/users/q2dg/following{/other_user}","gists_url":"https://api.github.com/users/q2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/q2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/q2dg/subscriptions","organizations_url":"https://api.github.com/users/q2dg/orgs","repos_url":"https://api.github.com/users/q2dg/repos","events_url":"https://api.github.com/users/q2dg/events{/privacy}","received_events_url":"https://api.github.com/users/q2dg/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T21:18:43Z","updated_at":"2015-08-22T21:18:43Z","body":"Well, it seems WiFi library also derives from Stream because it has several familiar methods: available(), read(), flush()...but this suspiction is not asserted anywhere. "}}