public StringLiteral(ByteList val) { bytelist = val; string = Helpers.byteListToString(bytelist); }
public StringLiteral(ByteList val) { bytelist = val; string = Helpers.byteListToString(bytelist); }
public static InetAddress getRubyInetAddress(ByteList address) throws UnknownHostException { // switched to String because the ByteLists were not comparing properly in 1.9 mode (encoding? // FIXME: Need to properly decode this string (see Helpers.decodeByteList) String addressString = Helpers.byteListToString(address); if (addressString.equals(BROADCAST)) { return InetAddress.getByAddress(INADDR_BROADCAST); } else if (addressString.equals(ANY)) { return InetAddress.getByAddress(INADDR_ANY); } else { return InetAddress.getByName(addressString); } }
public static InetAddress[] getRubyInetAddresses(ByteList address) throws UnknownHostException { // switched to String because the ByteLists were not comparing properly in 1.9 mode (encoding? // FIXME: Need to properly decode this string (see Helpers.decodeByteList) String addressString = Helpers.byteListToString(address); if (addressString.equals(BROADCAST)) { return new InetAddress[] {InetAddress.getByAddress(INADDR_BROADCAST)}; } else if (addressString.equals(ANY)) { return new InetAddress[] {InetAddress.getByAddress(INADDR_ANY)}; } else { return InetAddress.getAllByName(addressString); } }
public static InetAddress[] getRubyInetAddresses(ByteList address) throws UnknownHostException { // switched to String because the ByteLists were not comparing properly in 1.9 mode (encoding? // FIXME: Need to properly decode this string (see Helpers.decodeByteList) String addressString = Helpers.byteListToString(address); if (addressString.equals(BROADCAST)) { return new InetAddress[] {InetAddress.getByAddress(INADDR_BROADCAST)}; } else if (addressString.equals(ANY)) { return new InetAddress[] {InetAddress.getByAddress(INADDR_ANY)}; } else { return InetAddress.getAllByName(addressString); } }
public static InetAddress getRubyInetAddress(ByteList address) throws UnknownHostException { // switched to String because the ByteLists were not comparing properly in 1.9 mode (encoding? // FIXME: Need to properly decode this string (see Helpers.decodeByteList) String addressString = Helpers.byteListToString(address); if (addressString.equals(BROADCAST)) { return InetAddress.getByAddress(INADDR_BROADCAST); } else if (addressString.equals(ANY)) { return InetAddress.getByAddress(INADDR_ANY); } else { return InetAddress.getByName(addressString); } }
private static String internedStringFromByteList(ByteList val) { try { return Helpers.byteListToString(val).intern(); } catch (UnsupportedCharsetException e) { return val.toString().intern(); } }
private static String internedStringFromByteList(ByteList val) { try { return Helpers.byteListToString(val).intern(); } catch (UnsupportedCharsetException e) { return val.toString().intern(); } }