Code example for ByteArrayOutputStream

Methods: write

0
            if (data == null || data.length == 0) {
                return this;
            } 
 
            try { 
                this.dataStream.write(data);
            } catch (IOException ex) {
                // ignore - this is not possible with ByteArrayOutputStream 
            } 
            return this;
        } 
 
        /** 
         * Build a new inbound event instance using the supplied data. 
         * 
         * @return new inbound event instance. 
         */ 
        public InboundEvent build() { 
            return new InboundEvent( 
                    name,