Unmarshall a {@link String}.

@param in {@link ObjectInput} to read.
@return The {@link String} or {@code null}.
@throws IOException If any of the usual Input/Output related exceptions occur.
@see #marshallString(String, ObjectOutput).
506438
public static String unmarshallString(ObjectInput in) throws IOException {
      if (in.readBoolean()) {
         return null;
      }
      return in.readUTF();
   }
922409
public final byte[] decode(String in) {

        // sanitize the parameters
        if (in == null) {
            throw new NullPointerException();
        }

        // create the result buffer
        byte[] out = new byte[in.length() * bits / 8];

        // decode
        int outCount = 0; // number of output bytes produced
        int inCount = 0; // number of input characters consumed
        int buf = 0; // buffer of input bits not yet sent to output
        int bufBits = 0; // number of bits in the bit buffer
        while (inCount < in.length()) {
            int next = in.codePointAt(inCount);
            inCount++;
            if (next < min || next > max) {
                continue;
            }
            next = values[next - min];
            if (next == -1) {
                continue;
            }
            buf = (buf << bits) | next;
            bufBits += bits;
            while (bufBits >= 8) {
                out[outCount] = (byte) ((buf >>> (bufBits - 8)) & 0xff);
                bufBits -= 8;
                outCount++;
            }
        }

        // trim the result if there were any skipped characters
        if (outCount < out.length) {
            byte[] tmp = out;
            out = new byte[outCount];
            System.arraycopy(tmp, 0, out, 0, outCount);
        }
        return out;
    }
724895
public static String readString(DataInput in) throws IOException {
    int bytes = in.readUnsignedShort();
    return readChars(in, bytes);
  }
490513
public static String read(InputStream in, Charset charset) throws IORuntimeException {
		FastByteArrayOutputStream out = read(in);
		return null == charset ? out.toString() : out.toString(charset);
	}
723669
public static void copy(String in, Writer out) throws IOException {
		Assert.notNull(in, "No input String specified");
		Assert.notNull(out, "No Writer specified");
		try {
			out.write(in);
		}
		finally {
			try {
				out.close();
			}
			catch (IOException ex) {
			}
		}
	}
416788
public static String read(InputStream in) {
        InputStreamReader reader;
        try {
            reader = new InputStreamReader(in, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
        return read(reader);
    }
987971
protected Object deserialize(byte[] in) {
    Object rv=null;
    ByteArrayInputStream bis = null;
    ObjectInputStream is = null;
    try {
      if(in != null) {
        bis=new ByteArrayInputStream(in);
        is=new ObjectInputStream(bis);
        rv=is.readObject();
        is.close();
        bis.close();
      }
    } catch (IOException e) {
      getLogger().warn("Caught IOException decoding %d bytes of data",
          in == null ? 0 : in.length, e);
    } catch (ClassNotFoundException e) {
      getLogger().warn("Caught CNFE decoding %d bytes of data",
          in == null ? 0 : in.length, e);
    } finally {
      CloseUtil.close(is);
      CloseUtil.close(bis);
    }
    return rv;
  }
1305117
private static synchronized Document parseXmlString(String input) throws UnmarshalException {
		Document document = null;
		try {
			document = DOCUMENT_BUILDER.parse(new InputSource(new StringReader(input)));
		} catch (SAXException e) {
			IfmapJLog.error(e.getMessage());
			throw new UnmarshalException(e.getMessage());
		} catch (IOException e) {
			IfmapJLog.error(e.getMessage());
			throw new UnmarshalException(e.getMessage());
		}

		return document;
	}
202330
public static java.lang.reflect.Method read(ObjectInput in)
            throws ClassNotFoundException, NoSuchMethodException, IOException {
        Class cl;
        Class[] types;
        String name;

        cl = ClassRef.read(in);
        if (cl == null) {
            return null;
        } else {
            name = (String) in.readUTF();
            types = ClassRef.readClasses(in);
            return cl.getMethod(name, types);
        }
    }
1364019
public void readFrom (ObjectInputStream in)
        throws IOException
    {
        int length = in.readShort();
        _mask = new byte[length];
        in.read(_mask);
    }
880304
private <T> T unmarshalAs(String valueAsString, Class<T> asClass) throws IOException {
        return mapper.reader(asClass).readValue(valueAsString);
    }
430328
public static String readString(final ObjectInput in) throws IOException,
            ClassNotFoundException {
        try {
            Object o = in.readObject();
            return (String) o;
        } catch (OptionalDataException e) {
            StringBuilder bldr = new StringBuilder();
            if (e.length == 0) {
                bldr.append("(attempted to read past end of object data)");
            } else {
                bldr.append("(attempted to read object data when ");
                bldr.append(e.length);
                bldr.append(" byte(s) of primitive data is present)");
            }
            err.println(bldr);
            e.printStackTrace();
            throw e;
        }
    }
581298
public <T> T parse(String in, JsonReaderI<T> mapper) throws ParseException {
		return getPString().parse(in, mapper);
	}
78834
public static MutableSymbolTable readStringMap(ObjectInput in)
      throws IOException, ClassNotFoundException {

    int mapSize = in.readInt();
    MutableSymbolTable syms = new MutableSymbolTable();
    for (int i = 0; i < mapSize; i++) {
      String sym = in.readUTF();
      int index = in.readInt();
      syms.put(sym, index);
    }
    return syms;
  }
461160
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        boolean hasMessage = in.readBoolean();
        if (hasMessage)
        {
            message = MessageSerializer.unserializeFrom(in, false);
        }
    }
608370
public static String readAllToString(final InputStream in) throws IOException {
    return new String(readAllToBytes(in), StandardCharsets.UTF_8);
  }
683208
public static Class<?> read(ObjectInput in) throws java.io.IOException {
        byte dim;
        Class<?> cl;
        String name;

        dim = in.readByte();
        if (dim == -1) {
            return null;
        } else {
            name = in.readUTF();
            cl = classFind(name);
            if (cl == null) {
                throw new RuntimeException("can't load class " + name);
            }

            while (dim-- > 0) {
                cl = net.oneandone.sushi.util.Arrays.getArrayClass(cl);
            }
            return cl;
        }
    }