code: @Nonnull
      public static <Message extends PMessage<Message, Field>, Field extends PField>
      Stream<Message> resource(@Nonnull String resource,
                               @Nonnull Serializer serializer,
                               @Nonnull PMessageDescriptor<Message, Field> descriptor)
              throws IOException {
          ClassLoader classLoader = ClassLoader.getSystemClassLoader();
          InputStream in = classLoader.getResourceAsStream(resource);
          if(in == null) {
              in = MessageStreams.class.getResourceAsStream(resource);
              if (in == null) {
                  throw new IOException("No such resource " + resource);
              }
          }
          in = new BufferedInputStream(in);
          return stream(in, serializer, descriptor);
      }
docs: Read a file containing entries of a given type. Tries to detect the
  entry format of the file based on file magic. If not detected will try
  to use the default binary serializer format.
  
  @param resource   The file to read.
  @param serializer The serializer to use.
  @param descriptor The descriptor of the entry type of the file.
  @param <Message>  The message type.
  @param <Field>    The message field type.
  @return The stream that reads the file.
  @throws IOException when unable find the resource.