Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1252279

no way to create InetAddress from array of bytes

    Details

    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.4

      Description

      If you want to write an InetAddress to a stream there is a convenient 'getAddress'
      method which returns an array of bytes representing the address. But when you
      want to read in this array of bytes and convert it back to an InetAddress there is
      no way to do it.

      You could write the InetAddress out as a string and then use 'getByName' when
      you read back the string, but that involves reading and writing more, because
      the string is not as compact as a byte array.

      A static method for constructing an InetAddress from an array of bytes would
      be very handy.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: