code: public static StringPrep getInstance(int profile) {
          if (profile < 0 || profile > MAX_PROFILE) {
              throw new IllegalArgumentException("Bad profile type");
          }
  
          StringPrep instance = null;
  
          // A StringPrep instance is immutable.  We use a single instance
          // per type and store it in the internal cache.
          synchronized (CACHE) {
              WeakReference<StringPrep> ref = CACHE[profile];
              if (ref != null) {
                  instance = ref.get();
              }
  
              if (instance == null) {
                  ByteBuffer bytes = ICUBinary.getRequiredData(PROFILE_NAMES[profile] + ".spp");
                  if (bytes != null) {
                      try {
                          instance = new StringPrep(bytes);
                      } catch (IOException e) {
                          throw new ICUUncheckedIOException(e);
                      }
                  }
                  if (instance != null) {
                      CACHE[profile] = new WeakReference<StringPrep>(instance);
                  }
              }            
          }
          return instance;
      }
docs: Gets a StringPrep instance for the specified profile
  
  @param profile The profile passed to find the StringPrep instance.