Class NbtReadLimiter

java.lang.Object
net.glowstone.util.nbt.NbtReadLimiter

public class NbtReadLimiter extends Object
  • Field Details

  • Constructor Details

    • NbtReadLimiter

      public NbtReadLimiter(long limit)
  • Method Details

    • read

      public void read(int length)
      Increments the read-length count, and throws an exception if the limit is exceeded.
      Parameters:
      length - the length to add to the read-length count
      Throws:
      IllegalStateException - if the limit is exceeded