Package ch.njol.yggdrasil

Examples of ch.njol.yggdrasil.YggdrasilInputStream


 
  @Nullable
  public final static Object deserialize(final ClassInfo<?> type, InputStream value) {
    Serializer<?> s;
    assert (s = type.getSerializer()) != null && (s.mustSyncDeserialization() ? Bukkit.isPrimaryThread() : true);
    YggdrasilInputStream in = null;
    try {
      value = new SequenceInputStream(new ByteArrayInputStream(getYggdrasilStart(type)), value);
      in = Variables.yggdrasil.newInputStream(value);
      return in.readObject();
    } catch (final IOException e) { // i.e. invalid save
      if (Skript.testing())
        e.printStackTrace();
      return null;
    } finally {
      if (in != null) {
        try {
          in.close();
        } catch (final IOException e) {}
      }
      try {
        value.close();
      } catch (final IOException e) {}
View Full Code Here

TOP

Related Classes of ch.njol.yggdrasil.YggdrasilInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.