コード例 #1
0
 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
   try {
     packageId = new PackageIdentifier((String) in.readObject(), (PathFragment) in.readObject());
   } catch (SyntaxException e) {
     throw new IOException("Error serializing package identifier: " + e.getMessage());
   }
 }
コード例 #2
0
 public static PackageIdentifier createInDefaultRepo(PathFragment name) {
   try {
     return new PackageIdentifier(DEFAULT_REPOSITORY, name);
   } catch (SyntaxException e) {
     throw new IllegalArgumentException(
         "could not create package identifier for " + name + ": " + e.getMessage());
   }
 }