| java.lang.Object | |
| ↳ | com.facebook.common.internal.Files |
Provides utility methods for working with files.
All method parameters must be non-null unless documented otherwise.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static byte[] |
toByteArray(File file)
Reads all bytes from a file into a byte array.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Reads all bytes from a file into a byte array.
| file | the file to read from |
|---|
| IllegalArgumentException | if the file is bigger than the largest possible byte array (2^31 - 1) |
|---|---|
| IOException | if an I/O error occurs |