Package play.mvc

Class Http.RawBuffer

  • Enclosing class:
    Http

    public abstract static class Http.RawBuffer
    extends Object
    Handle the request body a raw bytes data.
    • Constructor Detail

      • RawBuffer

        public RawBuffer()
    • Method Detail

      • size

        public abstract Long size()
        Returns:
        the buffer size
      • asBytes

        public abstract ByteString asBytes​(int maxLength)
        Returns the buffer content as a bytes array.
        Parameters:
        maxLength - The max length allowed to be stored in memory
        Returns:
        null if the content is too big to fit in memory
      • asBytes

        public abstract ByteString asBytes()
        Returns:
        the buffer content as a bytes array
      • asFile

        public abstract File asFile()
        Returns:
        the buffer content as a file