Skip to content
Discussion options

You must be logged in to vote

/**
* Recursively sets the given {@link Data} and its components to big/little endian
*
* @param data The {@link Data}
* @param bigEndian True to set to big endian; false to set to little endian
* @throws Exception if there was a problem setting the endianness
*/
public static void setEndian(Data data, boolean bigEndian) throws Exception {
for (int i = 0; i < data.getNumComponents(); i++) {
Data component = data.getComponent(i);
SettingsDefinition[] settings = component.getDataType().getSettingsDefinitions();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GreaterGoodest
Comment options

Answer selected by GreaterGoodest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants