Top Description Inners Constructors Methods
org.lwjgl.util.opus

public abstract Class OPReadFunc

extends Callback
implements OPReadFuncI
Class Inheritance
All Implemented Interfaces
org.lwjgl.util.opus.OPReadFuncI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.util.opus.OPReadFunc.Container
Imports
javax.annotation.*, org.lwjgl.system.*

Instances of this class may be set to OpusFileCallbacks.

Type


int (*invoke) (
    void *_stream,
    unsigned char *_ptr,
    int _nbytes
)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
protected
pack-priv
OPReadFunc(long functionPointer)

Method Summary

Modifier and TypeMethod and Description
public static OPReadFunc

Returns:

the new OPReadFunc
create
(long functionPointer)

Creates a OPReadFunc instance from the specified function pointer.

public static OPReadFunc
create(OPReadFuncI instance)

Creates a OPReadFunc instance that delegates to the specified OPReadFuncI instance.

public static OPReadFunc
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

OPReadFuncback to summary
protected OPReadFunc()
OPReadFuncback to summary
pack-priv OPReadFunc(long functionPointer)

Method Detail

createback to summary
public static OPReadFunc create(long functionPointer)

Creates a OPReadFunc instance from the specified function pointer.

Returns:OPReadFunc

the new OPReadFunc

createback to summary
public static OPReadFunc create(OPReadFuncI instance)

Creates a OPReadFunc instance that delegates to the specified OPReadFuncI instance.

createSafeback to summary
public static OPReadFunc createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
org.lwjgl.util.opus back to summary

private final Class OPReadFunc.Container

extends OPReadFunc
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final OPReadFuncI

Constructor Summary

AccessConstructor and Description
pack-priv
Container(long functionPointer, OPReadFuncI delegate)

Method Summary

Modifier and TypeMethod and Description
public int
invoke(long
the stream to read from
_stream
,
long
the buffer to store the data in
_ptr
,
int
the maximum number of bytes to read. This function may return fewer, though it will not return zero unless it reaches end-of-file.
_nbytes
)

Implements org.lwjgl.util.opus.OPReadFuncI.invoke.

Reads up to _nbytes bytes of data from _stream.
Inherited from org.lwjgl.util.opus.OPReadFunc:
createcreatecreateSafe

Field Detail

delegateback to summary
private final OPReadFuncI delegate

Constructor Detail

Containerback to summary
pack-priv Container(long functionPointer, OPReadFuncI delegate)

Method Detail

invokeback to summary
public int invoke(long _stream, long _ptr, int _nbytes)

Implements org.lwjgl.util.opus.OPReadFuncI.invoke.

Doc from org.lwjgl.util.opus.OPReadFuncI.invoke.

Reads up to _nbytes bytes of data from _stream.

Parameters
_stream:long

the stream to read from

_ptr:long

the buffer to store the data in

_nbytes:int

the maximum number of bytes to read. This function may return fewer, though it will not return zero unless it reaches end-of-file.

Returns:int

the number of bytes successfully read, or a negative value on error

Annotations
@Override