(prefs) Preferences.putByteArray(byte[], int, int) convenience overload

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 1.4.1
    • Component/s: core-libs
    • Fix Understood
    • x86
    • windows_2000

      Name: rmT116609 Date: 12/20/2002


      DESCRIPTION OF THE PROBLEM :
      It would be a wonder time-saver and performance-enhancer to overload the method putByteArray() in java.util.prefs.Preferences with the following:

      public void putByteArray(byte[] array, int start, int len);

      That way the developer doesn't have to make his/her byte array exactly the size of the data being saved.

      CUSTOMER WORKAROUND :
      public static void put(Preferences p,
                             byte[] array,
                             int start,
                             int len) {

      byte[] shrinkyDink = new byte[len];
      System.arraycopy(array, start, shrinkyDink, 0, len);
      p.putByteArray(shrinkyDink);
      } //Ends method put
      (Review ID: 179352)
      ======================================================================
      ###@###.### 11/3/04 20:37 GMT

            Assignee:
            Xueming Shen
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: