Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hex nach String konvertieren

Empfohlene Antworten

Veröffentlicht

Hi All,

ich muss hexadezimale Werte, die Text darstellen, in einen String konvertieren.

Leider find ich keine passende Javaklasse dafür. Vielleicht könnt Ihr mir ja helfen.

Ciao

MasterC

Schau mal, ob die static Methoden der Klasse Integer helfen. Vor allem die, wo Du Text nach einem bestimmten radix parst.

Peter

Vielleicht hilft dir das hier weiter. Die Anworten stehen unter dem Sign up-Abschnitt.

Ich sollte mich noch mal klarer ausdrücken:

Ich habe eine Hex-Darstellung eines Textes.

0x6D6053....

Dies muss ich zurückumwnadeln in einen Text. Hierbei soll natürlich lesbarer Text in ASCII Code rauskommen.

Das folgende liefert Dir für einen Hexwert den passenden String. Vielleicht kannst Du damit was anfangen.


public class HexConverter

{

    public static void main(String[] args)

    {

        String hex = "41";

        System.out.println(String.valueOf((char) Byte.parseByte(hex, 16)));

    }

}

Peter

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.