The file “file.txt” exists on the file system and contsins ASCII text.  Given:   try {   File f = new File(“file.txt”);    OutputStream out = new FileOutputStream(f, true);   }    catch (IOException) {}   What is the result?()A、 The code does not compile.B、 The code runs and no change is made to the file.C、 The code runs and sets the length of the file to 0.D、 An exception is thrown because the file is not closed.E、 The code runs and deletes the file from the file system.

The file “file.txt” exists on the file system and contsins ASCII text.  Given:   try {   File f = new File(“file.txt”);    OutputStream out = new FileOutputStream(f, true);   }    catch (IOException) {}   What is the result?()

  • A、 The code does not compile.
  • B、 The code runs and no change is made to the file.
  • C、 The code runs and sets the length of the file to 0.
  • D、 An exception is thrown because the file is not closed.
  • E、 The code runs and deletes the file from the file system.

相关考题:

Use regex to remove all html tags from a file.

You are the administrator of a Windows 2000 Server computer. A folder named HR-Data on the system partition of the server is shared on the network as HR-Data. The owner of the HR-Data folder is Administrators.The shared permissions and NTFS permissions are shown in the following table.Share permissions:Everyone: FULL ControlNTFS permissionsDomain Admins: ReadKatrin: Full ControlKatrin creates a file in the HR-Data folder. She sets the NTFS permissions for the file to list only herself on the access control list, with Full Control permission. Katrin then leaves on vacation and cannot be contacted.Later, you discover that the file contains sensitive information and must be removed from the server as soon as possible. You want to delete the file without modifying any of the permissions for other files in the HR-Data folder. You want your actions to have least possible impact on users who may be using other files in the HR-Data folder. You want to use the minimum amount of authority necessary to delete the file.What should you do?A.Grant yourself Full Control permission for only the HR-data folder and not its subobjects. Delete the file. Then remove Full Control permission for HR-Data folder.B.Take ownership of the HR-Data folder. When prompted, take ownership of the existing files. Grant yourself Full Control permission for the file. Delete the file.C.Take ownership of the file. Grant yourself Modify permission for the file. Delete the file.D.Grant yourself Modify permission for the HR-Data folder and its subobjects. Delete the file. Then remove Modify permission for the HR-Data folder.

An administrator suspects someone is modifying a sensitive file, and wants to log access information for this file.  Which of the following AIX component accomplishes this()A、auditB、syslogC、TCBD、sysck

Using vi, you want to save changes to the file myfile with :w!, but vi complains it cannot write to the file. Therefore, you want to check the write permissions on the file. To do this without leaving vi, you type:()A、 :!ls-I myfileB、 :/ls-l myfileC、 esc :Is -I myfileD、 :?ls-l myfile

You issue this statement:ALTER DATABASE BACKUP CONTROLFILE TO TRACE;  What does the statement generate?()A、A text copy of the control file.B、A binary copy of the control file.C、A file containing a SQL statement which will re-create the database.D、A file containing a SQL statement which will re-create the control file.

You develop a Web application that writes data to a file on a server. You restrict access to the file to specific Windows users. The Web application runs as CONTOSO/ASPNET. You deny anonymous access to the application in IIS. You add the following XML segment in the Web.config file. You need to ensure that the application meets the following requirements: 1. It must impersonate the user when it writes data to the file 2. It must run as CONTOSO/ASPNET when a user does not access the file. Which two actions should you perform?()A、Use the following XML segment in the Web.config file.identity impersonate="false"/B、 Use the following XML segment in the Web.config file.identity impersonate="true"/C、Use the following code segment to access the file. WindowsPrincipal wp =(WindowsPrincipal)HttpContext,Current.User;WindowsIdentity wt = (WindowsIdentity)wp.Idetity;WindowsImpersonationContext wic = wi.Impersonate();// Access The file herewic.Undo();D、Use the following code segment to access the file. WindowsIdentity wi = WindowsIdetity.GetCurrent();WindowsImpersonationContext wic = WindowsIdentity.Impersonate(wi.Token);// Access the file herewic.Undo();

A system administrator would like to verify the user definitions in the /etc/passwd file. Which of the following commands will accomplish this?()A、usrckB、sysckC、lssecD、lsuser

An administrator received a call from a user whose PC crashed while using vi to edit a file. The user wants the edited file back. Where should the administrator look for the file()A、/tmpB、/var/preserveC、/var/tmp/$USERD、$HOME/.vi

You have lost datafile 4 from your database. Which is typically the fastest way to restore your database? ()A、Restore and recover the datafile. B、Restore and recover the tablespace. C、Restore and recover the database. D、Restore and recover the control file. E、Restore and recover the parameter file.

The data file belonging to theSYSTEMtablespaceis corrupted and no backup of the file is available. How do you recover the data file?()A、The data file cannot be recovered.B、The date file can be restored from theSYSTEMauto backup.C、Take thetablespaceoffline,drop,kand re-create it.D、Recovery Manager (RMAN) is used to recover the data file.E、The ALTER DATABSE CREATE DATAFILE..commandis used to recover the data file.

You develop a Web application that writes data to a file on a server. You restrict access to the file to specific Windows users. The Web application runs as CONTOSO/ASPNET. You deny anonymous access to the application in IIS. You add the following XML segment in the Web.config file.You need to ensure that the application meets the following requirements:It must impersonate the user when it writes data to the file.It must run as CONTOSO/ASPNET when a user does not access the file. Which two actions should you perform? ()A、Use the following XML segment in the Web.config file. identity impersonate="false"/B、Use the following XML segment in the Web.config file. identity impersonate="true"/C、Use the following code segment to access the file. Dim wp As WindowsPrincipal = _CType(HttpContext.Current.User, WindowsPrincipal) Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent() Dim wic As WindowsImpersonationContext = wi.Impersonate()' Access the file herewic.Undo()D、Use the following code segment to access the file. Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent()Dim wic As WindowsImpersonationContext = _WindowsIdentity.Impersonate(wi.Token)' Access the file herewic.Undo()

单选题You backed up the control file to trace. Which statement is true about the trace file generated?()AThe trace file is in binary format.BThe trace file has a SQL script to re-create the control file.CThe trace file is a backup set created during the backup of the control file. DThe trace file contains the instructions to manually re-create the control file.EThe trace file is an image copy of the control file created during the backup of the control file.

单选题You created a response file and want to check it before starting installations in silent mode. You started installation of Oracle software in interactive mode by providing the response file. In the middle of the installation, you realize that the behavior of the Oracle Universal Installer (OUI) is not consistent with the response file. What action would you take to detect the cause of this behavior?()ACompare the contents of the install.log file with the response file.BRefer to the contents of the oraInst.loc file to verify the steps performed by OUI.CCompare the contents of the installActions.log file with that of the response file.DRefer to the alert log file for information regarding the actions performed by OUI during installation.

单选题Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS).You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application.You need to complete the deployment of this service to IIS. What should you do next?()ACreate an asmx file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.BCreate an .asmx file and add a @Register directive to this file. Copy the file to the bin directoyy of the application.CCreate a svc file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.DCreate a .svc file and add a @Register directive to this file. Copy the file to the bin directory of the application.

单选题You manage a computer running Windows 2000 Professional that belongs to a workgroup. You create a new user account (Tony) on that computer that is not a member of the Administrators group. You log on using the new account. You create a file with notepad in a folder that is on a volume formatted with NTFS. You encrypt the file. You give another user account defined on that computer, Luis the permission to take ownership of the file. Luis logs on using the account and takes ownership. However, she receives an error message reporting that access is denied when she tries to open the file. What can you do to allow Luis to open the file?()AInstruct Luis to decrypt the file before she tries to open it.BLog on with the account Tony and decrypt the file.CMove the file to a folder that is not encrypted on a different volume that is formatted with NTFS.DMove the file to a folder that is not encrypted on the same volume.

单选题ou have a large amount of historical data in a flat file. Some analysts in your organization need to query thisdata in the file. The file is too large to load the data in it into your current database.  Which is the most effectivemethod to access this data in your database()AUse the database link.BUse the SQL*Loader utility.CUse the Oracle Data Pump utility.DCreate an external table and leave the data in the flat file

单选题When planning to access the on-line documentation from a remote client, which of the following procedures should be performed on the server?()AInstall and configure the HTTPServer. BAdd the name(s) of the client(s) to the httplite.conf file. CAdd the names of any clients expecting to access the documentation to the /etc/hosts file. DNo action is required.

单选题You have a large amount of historical data in a flat file. Some analysts in your organization need toquery this data in the file. The file is too large to load the data in it into your current database.  Which is the most effective method to access this data in your database()AUse the database link.BUse the SQL*Loader utility.CUse the Oracle Data Pump utility.DCreate an external table and leave the data in the flat file

单选题You have lost datafile 4 from your database. Which is typically the fastest way to restore your database? ()ARestore and recover the datafile. BRestore and recover the tablespace. CRestore and recover the database. DRestore and recover the control file. ERestore and recover the parameter file.

单选题You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.  You use Windows Authentication for the application. You set up NTFS file system permissions for the Sales group to access a particular file. You discover that all the users are able to access the file.  You need to ensure that only the Sales group users can access the file. What additional step should you perform?()ARemove the rights from the ASP.NET user to the file. BRemove the rights from the application pool identity to the file. CAdd the identity impersonate=true/ section to the Web.config file. DAdd the authentication mode=[None] section to the Web.config file.

单选题An administrator received a call from a user whose PC crashed while using vi to edit a file. The user wants the edited file back. Where should the administrator look for the file()A/tmpB/var/preserveC/var/tmp/$USERD$HOME/.vi

单选题You are managing an Oracle Database 10g database that uses Oracle Managed Files (OMF). You enabled the block change tracking feature for the database. Which statement regarding the change tracking file is true?()A One block change tracking file is created for each data file. By default, the file is created in DB_CREATE_FILE_DEST.B One block change tracking file is created for each data file. By default, the file is created in BACKGROUND_DUMP_DEST.C One block change tracking file is created for the database. By default, the file is created in DB_CREATE_FILE_DEST.D One block change tracking file is created for the database. By default, the file is created in BACKGROUND_DUMP_DEST.

单选题What is the name of the file that is used to provide the configuration setting in unattended mode?()AAnswer file.BStartup file.CUnattended configuration file.DNetwork file.

单选题You are the network administrator for Test King. All network servers run Windows Server 2003. You perform a full backup of the network every Monday. You perform incremental backups on Tuesday, Wednesday, Thursday, and Friday. Backups are always performed at 1:00 A.M. On Friday afternoon, a user accidentally deletes a file. You need to restore the file. What should you do?()AOpen each backup log, beginning with Monday and moving forward through the week. In each log, search for a backup of the file. Restore the first backup that you find.BOpen each backup log, beginning with Friday and moving backward through the week. In each log, search for a backup of the file. Restore the first backup that you find.COpen each backup log, beginning with Tuesday and moving forward through the week. In each log, search for a backup of the file. Restore the first backup that you find.DOpen the backup log for Monday. Search for a backup of the file. If you find a backup, restore the file. If you do not find a backup, open the backup log for Friday and search there. If you find a backup, restore the file. If you do not find a backup, continue opening backup logs, moving backward through the week from FridayRestore the first backup that you find.

单选题You issue this SQL statement:  ALTER DATABASE RENAME FILE ’/ORADATA/u02/user_data01.dbf’ TO ’/ORADATA/u04/user_data01.dbf’;  What does this SQL statement do?()AIt updates the control file with the new location of the data file. BIt updates only the data dictionary with the new location of the data file. CIt changes the location of the user_data01.dbf file in the operating system. DIt changes the location of the user_data01.dbf file in the operating system and updates the control file with the new location of the data file.

单选题Using vi, you want to save changes to the file myfile with :w!, but vi complains it cannot write to the file. Therefore, you want to check the write permissions on the file. To do this without leaving vi, you type:()A :!ls-I myfileB :/ls-l myfileC esc :Is -I myfileD :?ls-l myfile

单选题The character mode sales report is stored on the network drive as a .REX. You need to make changes to the report layout. Using the report builder how would you change this file?()AOpen the file using the menu option file-open make the changes and recompile the report. BConvert the file into .REP file using the report compiler make the changes and convert the file back to a .REX file. CExecute the R30CONV command to convert the file to a .RDF file, make the changes and convert the file back to a .REX file. DChoose file - administration-compile. Convert the file to a .REP file, make the changes and convert the file back to a .REX file. EExecute the R30CONV command to convert the file to a .REP file, make the changes and convert the file back to a .REX file.

单选题You are the network administrator for Test King. All network servers run Windows Server 2003. You perform a full backup of the network every Monday. You perform incremental backups on Tuesday, Wednesday, Thursday, and Friday. Backups are always performed at 1:00 A.M. On Friday afternoon, a user accidentally deletes a file. You need to restore the file. What should you do?()AOpen each backup log, beginning with Monday and moving forward through the week. In each log, search for a backup of the file. Restore the first backup that you find.BOpen each backup log, beginning with Friday and moving backward through the week. In each log, search for a backup of the file. Restore the first backup that you find.COpen each backup log, beginning with Tuesday and moving forward through the week. In each log, search for a backup of the file. Restore the first backup that you find.DOpen the backup log for Monday. Search for a backup of the file. If you find a backup, restore the file. If you do not find a backup, open the backup log for Friday and search there. If you find a backup, restore the file. If you do not find a backup, continue opening backup logs, moving backward through the week from FridayRestore the first backup that you find.