MCPcopy Create free account
hub / github.com/apache/avro / write

Method write

lang/php/lib/IO/AvroStringIO.php:72–85  ·  view source on GitHub ↗

* Append bytes to this buffer. * (Nothing more is needed to support Avro.) * @param string $arg bytes to write * @returns int count of bytes written. * @throws AvroIOException if $args is not a string value. */

($arg)

Source from the content-addressed store, hash-verified

70 * @throws AvroIOException if $args is not a string value.
71 */
72 public function write($arg)
73 {
74 $this->checkClosed();
75 if (is_string($arg)) {
76 return $this->appendStr($arg);
77 }
78 throw new AvroIOException(
79 sprintf(
80 'write argument must be a string: (%s) %s',
81 gettype($arg),
82 var_export($arg, true)
83 )
84 );
85 }
86
87 /**
88 * @throws AvroIOException if the buffer is closed.

Callers

nothing calls this directly

Calls 2

checkClosedMethod · 0.95
appendStrMethod · 0.95

Tested by

no test coverage detected