Class WffBMByteArray

  • All Implemented Interfaces:
    java.io.Serializable


    public class WffBMByteArray
    extends java.io.ByteArrayOutputStream
    implements java.io.Serializable
    This a byte array to hold utf-8 bytes. use WffBMByteArray.write to add bytes into this array.
    Sample :-
     WffBMObject bmObject = new WffBMObject();
    
     WffBMByteArray byteArray = new WffBMByteArray(); byteArray.write("こんにちは
     WFFWEB".getBytes("UTF-8"));
    
     bmObject.put("byteArray", BMValueType.BM_BYTE_ARRAY, byteArray);
    
     
    See Also:
    WffBMArray, WffBMObject, Serialized Form
    • Field Summary

      • Fields inherited from class java.io.ByteArrayOutputStream

        buf, count
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] build​()  
      byte[] build​(boolean outer)  
      BMValueType getValueType​()  
      boolean isOuter​()  
      void setOuter​(boolean outer)  
      • Methods inherited from class java.io.ByteArrayOutputStream

        close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class java.io.OutputStream

        flush, write
    • Constructor Detail

      • WffBMByteArray

        public WffBMByteArray​()
      • WffBMByteArray

        public WffBMByteArray​(boolean outer)
      • WffBMByteArray

        public WffBMByteArray​(byte[] bmArrayBytes)
      • WffBMByteArray

        public WffBMByteArray​(byte[] bmArrayBytes,
                              boolean outer)
    • Method Detail

      • isOuter

        public boolean isOuter​()
      • setOuter

        public void setOuter​(boolean outer)
      • build

        public byte[] build​()
        Returns:
        the wff bm array bytes
        Since:
        2.0.0
      • build

        public byte[] build​(boolean outer)
        Parameters:
        outer -
        Returns:
        the wff bm array bytes as outer array
        Since:
        1.1.5