org.eclipse.persistence.internal.helper.Helper.writeHexString()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中org.eclipse.persistence.internal.helper.Helper.writeHexString()方法的一些代码示例,展示了Helper.writeHexString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.writeHexString()方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:writeHexString

Helper.writeHexString介绍

[英]Convert the byte array to a HEX string. HEX allows for binary data to be printed.
[中]将字节数组转换为十六进制字符串。十六进制允许打印二进制数据。

代码示例

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * Append the ByteArray in ODBC literal format ({b hexString}).
  3. * This limits the amount of Binary data by the length of the SQL. Binding should increase this limit.
  4. */
  5. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  6. writer.write("{b '");
  7. Helper.writeHexString(bytes, writer);
  8. writer.write("'}");
  9. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * Append the ByteArray in ODBC literal format ({b hexString}).
  3. * This limits the amount of Binary data by the length of the SQL. Binding should increase this limit.
  4. */
  5. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  6. writer.write("{b '");
  7. Helper.writeHexString(bytes, writer);
  8. writer.write("'}");
  9. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * Append the ByteArray in ODBC literal format ({b hexString}).
  3. * This limits the amount of Binary data by the length of the SQL. Binding should increase this limit.
  4. */
  5. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  6. writer.write("{b '");
  7. Helper.writeHexString(bytes, writer);
  8. writer.write("'}");
  9. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * INTERNAL:
  3. * Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(),
  4. * otherwise use ODBC format from DatabasePLatform.
  5. */
  6. @Override
  7. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  8. if (usesNativeSQL()) {
  9. writer.write("BLOB(x'");
  10. Helper.writeHexString(bytes, writer);
  11. writer.write("')");
  12. } else {
  13. super.appendByteArray(bytes, writer);
  14. }
  15. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  3. * as provided in DatabasePlatform.
  4. */
  5. @Override
  6. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  7. if (usesNativeSQL()) {
  8. writer.write("Ox");
  9. Helper.writeHexString(bytes, writer);
  10. } else {
  11. super.appendByteArray(bytes, writer);
  12. }
  13. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * INTERNAL:
  3. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  4. * as provided in DatabasePlatform.
  5. */
  6. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  7. if (usesNativeSQL()) {
  8. writer.write('\'');
  9. Helper.writeHexString(bytes, writer);
  10. writer.write('\'');
  11. } else {
  12. super.appendByteArray(bytes, writer);
  13. }
  14. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * INTERNAL:
  3. * Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(),
  4. * otherwise use ODBC format from DatabasePLatform.
  5. */
  6. @Override
  7. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  8. if (usesNativeSQL()) {
  9. writer.write("BLOB(x'");
  10. Helper.writeHexString(bytes, writer);
  11. writer.write("')");
  12. } else {
  13. super.appendByteArray(bytes, writer);
  14. }
  15. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * INTERNAL:
  3. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  4. * as provided in DatabasePlatform.
  5. */
  6. @Override
  7. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  8. if (usesNativeSQL()) {
  9. writer.write('\'');
  10. Helper.writeHexString(bytes, writer);
  11. writer.write('\'');
  12. } else {
  13. super.appendByteArray(bytes, writer);
  14. }
  15. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  3. * as provided in DatabasePlatform.
  4. */
  5. @Override
  6. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  7. if (usesNativeSQL()) {
  8. writer.write("Ox");
  9. Helper.writeHexString(bytes, writer);
  10. } else {
  11. super.appendByteArray(bytes, writer);
  12. }
  13. }

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * INTERNAL:
  3. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  4. * as provided in DatabasePlatform.
  5. */
  6. @Override
  7. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  8. if (usesNativeSQL()) {
  9. writer.write('\'');
  10. Helper.writeHexString(bytes, writer);
  11. writer.write('\'');
  12. } else {
  13. super.appendByteArray(bytes, writer);
  14. }
  15. }

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
  3. * as provided in DatabasePlatform.
  4. */
  5. @Override
  6. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  7. if (usesNativeSQL()) {
  8. writer.write("Ox");
  9. Helper.writeHexString(bytes, writer);
  10. } else {
  11. super.appendByteArray(bytes, writer);
  12. }
  13. }

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * INTERNAL:
  3. * Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(),
  4. * otherwise use ODBC format from DatabasePLatform.
  5. */
  6. @Override
  7. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  8. if (usesNativeSQL()) {
  9. writer.write("BLOB(x'");
  10. Helper.writeHexString(bytes, writer);
  11. writer.write("')");
  12. } else {
  13. super.appendByteArray(bytes, writer);
  14. }
  15. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. @Override
  5. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  6. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  7. writer.write("0x");
  8. Helper.writeHexString(bytes, writer);
  9. } else {
  10. super.appendByteArray(bytes, writer);
  11. }
  12. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  5. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  6. writer.write("0x");
  7. Helper.writeHexString(bytes, writer);
  8. } else {
  9. super.appendByteArray(bytes, writer);
  10. }
  11. }

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. @Override
  5. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  6. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  7. writer.write("0x");
  8. Helper.writeHexString(bytes, writer);
  9. } else {
  10. super.appendByteArray(bytes, writer);
  11. }
  12. }

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  5. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  6. writer.write("0x");
  7. Helper.writeHexString(bytes, writer);
  8. } else {
  9. super.appendByteArray(bytes, writer);
  10. }
  11. }

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  5. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  6. writer.write("0x");
  7. Helper.writeHexString(bytes, writer);
  8. } else {
  9. super.appendByteArray(bytes, writer);
  10. }
  11. }

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  1. /**
  2. * If using native SQL then print a byte[] as '0xFF...'
  3. */
  4. protected void appendByteArray(byte[] bytes, Writer writer) throws IOException {
  5. if (usesNativeSQL() && (!usesByteArrayBinding())) {
  6. writer.write("0x");
  7. Helper.writeHexString(bytes, writer);
  8. } else {
  9. super.appendByteArray(bytes, writer);
  10. }
  11. }

相关文章

Helper类方法