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.

Dateizugriff, datei-header / Mime-type auslesen.

Empfohlene Antworten

hi,

ich lese mit einem kleinen Programm mehrere Dateien aus, doch abgesehen vom Inhalt muss ich noch wissen, welchen mime-typen die datei hat (soweit ich weis bestimmt anhand dessen Linux, womit es die datei öffnen will) und k.A. was noch an Header-informationen da sind an die ich mit einem normalen Filereader nicht komme ?

google hat bisher nciht geholfen.

danke

das hilft mir nicht wirklich, denn das sind immer dinger die auf Frameworks/Bibliotheken basieren, die ich hierfür nicht benutzen darf.

Andere Infos setzen auf JSP/Web, ich spreche aber von einem "lokalen" Dateizugriff.

Eine Erkennung der MIME-Typen ist mit der Standardbibliothek nicht möglich. Sun bietet allerdings mit Glasgow (http://java.sun.com/products/javabeans/glasgow/jaf.html) über das Java-Archiv activation.jar eine Klasse javax.activation.MimetypesFileTypeMap, die MIME-Types ermittelt.

Du kannst auch die 1.6 Beta benutzen:

http://download.java.net/jdk6/docs/api/javax/activation/MimetypesFileTypeMap.html

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.