esa / CCSDS_MO_TRANS

REPOSITORY ARCHIVED - for the latest version please go to https://github.com/esa/mo-services-java
Other
3 stars 7 forks source link

Report the end-of-file event as exception #9

Closed gbonnefille closed 7 years ago

gbonnefille commented 8 years ago

When using a non-blocking InputStream, the read method can return -1.

gbonnefille commented 7 years ago

Le 15/12/2016 à 18:48, CesarCoelho a écrit :

Why don't you just throw a standard IOException exception upwards in case it is -1. The GEN Transport should handle it, no?

Just because IOException was not specified as throwable exception and I didn't want to change the API.