Why is OutputStream.write (int) accepting an int to write a byte?

I just noticed that OutputStreamin Java it has a method OutputStream.write(int). This method is used to write byteto the stream. The documentation says that the 24 high-order bits are ignored. But why is the argument int, not just bytes?

+3
source share

All Articles