code: public synchronized static Streamer getStreamer (final Class<?> target)
          throws IOException
      {
          // if we have not yet initialized ourselves, do so now
          maybeInit();
  
          Streamer stream = _streamers.get(target);
          if (stream == null) {
              // Get or create a streamer for the class, and cache it.
              // First, see if it's a collection type...
              Class<?> collClass = getCollectionClass(target);
              if (collClass != null) {
                  stream = getStreamer(collClass);
  
              // otherwise make sure it's a streamable class
              } else if (!isStreamable(target)) {
                  throw new IOException(
                      "Requested to stream invalid class '" + target.getName() + "'");
  
              } else {
                  // create a new streamer for the class
                  if (ObjectInputStream.STREAM_DEBUG) {
                      log.info("Creating a streamer for '" + target.getName() + "'.");
                  }
  
                  // create our streamer in a privileged block so that it can introspect on the to be
                  // streamed class
                  try {
                      stream = AccessController.doPrivileged(
                          new PrivilegedExceptionAction<Streamer>() {
                              public Streamer run () throws IOException {
                                  return create(target);
                              }
                          });
                  } catch (PrivilegedActionException pae) {
                      throw (IOException) pae.getCause();
                  }
              }
  
              // cache the streamer by the class type
              _streamers.put(target, stream);
          }
          return stream;
      }
docs: Obtains a {@link Streamer} that can be used to read and write objects of the specified
  target class. {@link Streamer} instances are shared among all {@link ObjectInputStream}s and
  {@link ObjectOutputStream}s.
  
  @param target the class that is desired to be streamed. This should be the result of a call
  to {@link #getStreamerClass} if the caller has an instance they wish to stream.
  
  @throws IOException when a streamer is requested for an object that does not implement
  {@link Streamable} and is not one of the basic object types (@see {@link
  ObjectOutputStream}).