i want to write "fread" in java
c++ i s here;
int fread (void * buffer, size_t size, size_t count, FILE * stream);
Read block of data from a stream.
Read count number of items each one with a size of size bytes from the stream and stores it in the specified buffer.
Stream's postion indicator is increased by the number of bytes readed.
Total amount of bytes read is (size x count).
how can i do it ?