Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/UserGuide/MOXy/Simple Values/Special Schema Types/Binary Types"
< EclipseLink | UserGuide | MOXy | Simple Values | Special Schema Types
Line 10: | Line 10: | ||
= Binary Types= | = Binary Types= | ||
− | There are a few extra things to consider when mapping to fields of type '''byte[ ]''' or '''Byte[]'''. | + | There are a few extra things to consider when mapping to fields of type '''byte[ ]''' or '''Byte[ ]'''. |
− | == byte[ ] versus Byte[] == | + | == byte[ ] versus Byte[ ] == |
− | Unlike other Java primitive/wrapper types, Eclipselink differentiates between '''byte[]''' (primitive) and '''Byte[]''' (wrapper) data types. By default, '''byte[]''' will marshal to | + | Unlike other Java primitive/wrapper types, Eclipselink differentiates between '''byte[ ]''' (primitive) and '''Byte[ ]''' (wrapper) data types. By default, '''byte[ ]''' will marshal to an element or attribute of type '''base64Binary''', whereas '''Byte[ ]''' will marshal each byte as its own element. |
<div style="width:700px"> | <div style="width:700px"> | ||
<source lang="java"> | <source lang="java"> | ||
</source> | </source> |
Revision as of 12:31, 28 June 2011
EclipseLink MOXy
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source |
Key API
Contents
Binary Types
There are a few extra things to consider when mapping to fields of type byte[ ] or Byte[ ].
byte[ ] versus Byte[ ]
Unlike other Java primitive/wrapper types, Eclipselink differentiates between byte[ ] (primitive) and Byte[ ] (wrapper) data types. By default, byte[ ] will marshal to an element or attribute of type base64Binary, whereas Byte[ ] will marshal each byte as its own element.