| 
 | |||||||
| 
 | 
|  | 
|  | 
|  | Strumenti | 
|  26-07-2009, 18:38 | #1 | 
| Member Iscritto dal: Oct 2005 Città: Roma 
					Messaggi: 175
				 | 
				
				[Java] mappare un file in memoria
			 
		Ciao, sto scrivendo un'applicazione che deve mappare in memoria un file video, e poi leggerlo tramite le librerie jmf. Il problema è che il player che ho, vuole come parametro il descrittore del file mentre io ho l'area di memoria da passare e non sò come fare. Ecco il codice: Codice: String nameFile; nameFile = list2.getSelectedItem(); FileChannel rwCh = null; rwCh = (new RandomAccessFile(nameFile, "rw")).getChannel(); long fileSize = 0; fileSize = rwCh.size(); MappedByteBuffer mapFile = rwCh.map(FileChannel.MapMode.READ_WRITE, 0, fileSize); rwCh.close(); URL mediaURL = mapFile.toURL(); // il problema è qui, dove vuole il descrittore di un file! Codice: C:\Documents and Settings\DarkSun\Documenti\NetBeansProjects\DRM\src\my\drm\drmGUI.java:462: cannot find symbol
symbol  : variable mapFile
location: class my.drm.drmGUI
            mediaURL = mapFile.toURL();
Note: C:\Documents and Settings\DarkSun\Documenti\NetBeansProjects\DRM\src\my\drm\drmGUI.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
C:\Documents and Settings\DarkSun\Documenti\NetBeansProjects\DRM\nbproject\build-impl.xml:363: The following error occurred while executing this line:
C:\Documents and Settings\DarkSun\Documenti\NetBeansProjects\DRM\nbproject\build-impl.xml:168: Compile failed; see the compiler error output for details.
				__________________ AN7, Athlon xp2400 @2400MHz, OCZ pc 3700 gold, 6600GT @600MHz, raid0 with seagate, Pioneer DVD-RW DVR-115D, PCTV, Thermaltake Purepower 420W, OCLABS liquid, Gentoo powered. MyCase, Bubble-TraProjex visita il mio sito: www.ecoglobo.it | 
|   |   | 
|   | 
| Strumenti | |
| 
 | 
 | 
Tutti gli orari sono GMT +1. Ora sono le: 14:49.









 
		 
		 
		 
		






 
  
 



 
                        
                        










