in util/src/stream.c [24:98]
int AXIS2_CALL axutil_stream_write_basic(
axutil_stream_t *stream,
const axutil_env_t *env,
const void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_read_basic(
axutil_stream_t *stream,
const axutil_env_t *env,
void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_skip_basic(
axutil_stream_t *stream,
const axutil_env_t *env,
int count);
/** file stream operations **/
int AXIS2_CALL axutil_stream_write_file(
axutil_stream_t *stream,
const axutil_env_t *env,
const void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_read_file(
axutil_stream_t *stream,
const axutil_env_t *env,
void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_skip_file(
axutil_stream_t *stream,
const axutil_env_t *env,
int count);
/** socket stream operations **/
int AXIS2_CALL axutil_stream_write_socket(
axutil_stream_t *stream,
const axutil_env_t *env,
const void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_read_socket(
axutil_stream_t *stream,
const axutil_env_t *env,
void *buffer,
size_t count);
int AXIS2_CALL axutil_stream_skip_socket(
axutil_stream_t *stream,
const axutil_env_t *env,
int count);
AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
axutil_stream_create_internal(
const axutil_env_t *env)
{
axutil_stream_t *stream = NULL;
stream = (axutil_stream_t *)AXIS2_MALLOC(env->allocator, sizeof(axutil_stream_t));
if(!stream)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory. Cannot create axutil stream");
return NULL;
}
stream->buffer = NULL;
stream->buffer_head = NULL;
stream->fp = NULL;
stream->socket = -1;
stream->len = -1;
stream->max_len = -1;
stream->axis2_eof = EOF;
return stream;
}