try {
// I need to be able to move back in the stream if this is not a pb serialization so I can
// do the Writable decoding instead.
in = in.markSupported()? in: new BufferedInputStream(in);
int pblen = ProtobufUtil.lengthOfPBMagic();
in.mark(pblen);
byte [] pbuf = new byte[pblen];
int read = in.read(pbuf);
if (read != pblen) throw new IOException("read=" + read + ", wanted=" + pblen);
// WATCHOUT! Return in middle of function!!!
if (ProtobufUtil.isPBMagicPrefix(pbuf)) return convert(FSProtos.Reference.parseFrom(in));