diff --git a/src/main/java/org/tarantool/jdbc/SQLResultSet.java b/src/main/java/org/tarantool/jdbc/SQLResultSet.java index 95c03a2b..85d36844 100644 --- a/src/main/java/org/tarantool/jdbc/SQLResultSet.java +++ b/src/main/java/org/tarantool/jdbc/SQLResultSet.java @@ -295,7 +295,8 @@ public InputStream getAsciiStream(String columnLabel) throws SQLException { @Override public InputStream getUnicodeStream(int columnIndex) throws SQLException { - return new ByteArrayInputStream(getString(columnIndex).getBytes(Charset.forName("UTF-8"))); + String string = getString(columnIndex); + return string == null ? null : new ByteArrayInputStream(string.getBytes(Charset.forName("UTF-16"))); } @Override