I have to write 7 byte Integer value to DataOutputStream, this Integer contains 15 digits. How can I do that?
7 bytes = 56 bits
that means you can represent numbers up to 2^56 which is more than necessary for 15 digit long numbers.
just convert the number to binary and store it in those 7 bytes that you're sending.