{"title":"InStream.EOS() Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/instream/instream-eos-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/instream/instream-eos-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/instream/instream-eos-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Indicates whether an input stream has reached End of Stream (EOS).","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Syntax","slug":"syntax","at":127,"chars":112},{"level":2,"title":"Parameters","slug":"parameters","at":239,"chars":97},{"level":2,"title":"Return Value","slug":"return-value","at":336,"chars":120},{"level":2,"title":"Remarks","slug":"remarks","at":456,"chars":173},{"level":2,"title":"Example","slug":"example","at":629,"chars":880},{"level":2,"title":"Related information","slug":"related-information","at":1509,"chars":136}],"text":"> Version: _Available or changed with runtime version 1.0._\nIndicates whether an input stream has reached End of Stream (EOS).\n## Syntax\n```al\nIsEOS :=   InStream.EOS()\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nInStream\nType: instream-data-type\nAn instance of the instream-data-type data type.\n## Return Value\nIsEOS\nType: ../boolean/boolean-data-type\ntrue if the stream has reached End of Stream; otherwise false.\n## Remarks\nIf you are reading data from an external component, EOS can return false even though no more data is available. This may occur if you have not called Read first.\n## Example\nThe following example opens the text file in a folder that is named MyFolder. The data in the text file is read into and input stream variable named StreamInTest. The InStream.EOS Method<../library> is used to determine whether the input stream has reached the end. If the stream has not reached the end, the stream is read into a text buffer, which indicates that the stream has not reached the end until the stream reaches the end. You must also create the following file 'c:\\\\MyFolder\\\\MyText.txt'.\n```al\n var\n    StreamInTest: InStream;\n    FileTest: File;\n    Buffer: Text;\nbegin\n    FileTest.Open('c:\\MyFolder\\MyText.txt');\n    FileTest.CreateInStream(StreamInTest);\n    while not StreamInTest.EOS do begin\n      StreamInTest.ReadText(Buffer);\n      //Do some processing\n      Message('Stream is still processing')\n    end;\n    Message('End of Stream');\nend;\n```\n## Related information\ninstream-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}