Questions tagged [filehandler]

File handlers are mechanisms which provide abstraction over primitive file operations.

File handlers are modules (e.g. classes) which wrap primitive file operations (e.g. read, write) and file system operations (e.g. unlink, move, file watching) in helpful abstractions for specific usage scenarios.

For example, a file handler implemented as a class in opens a file in the format, reads each entry, and populates a list of row objects. In this case, the file handler has wrapped the open and read calls so the the caller need only know the name of the file.

Questions relating to the development of custom file handlers should include this tag. Additionally, questions which involve the use of standard or third-party file handlers may also include this tag.

See also:

147 questions
0
votes
1 answer

Performance hit opening and closing filehandler?

I have a persistent event-driven HTTP upload program (hot folder) that writes to a log on every action. It runs indefinitely until the user decides to close it. To ensure the log is closed when the application is closed, I have written the program…
jahmezz
  • 416
  • 1
  • 5
  • 15
0
votes
2 answers

Java Logger FileHandler naming convention

I have a servlet deployed. I am a little confused about the log files being generated. particularly i am not sure which one to look at. There are several generated with the same data. I am using the following code to initialize my…
codeNinja
  • 1,442
  • 3
  • 25
  • 61
0
votes
1 answer

Pass size and name to the .onload event of JavaScript's FileHandler

How is it possible to pass the name and size of a file to the .onload event of JavaScript's FileHandler. As you can see I'm using the (still undeclared) variables size and name in my Ajax call below. However, I somehow have to pass them from the…
Tolsto
  • 1,418
  • 2
  • 17
  • 45
0
votes
2 answers

Java FileHandler Adding Unnecessary Digit to File Name

I'm working with JUL for my logging (no I can't change that). I've developed a simple wrapper that I pass in the parameters and it creates the FileHandler with the correct format every time so that I don't have to recreate the logging in every…
mja
  • 69
  • 1
  • 2
  • 9
0
votes
1 answer

Java XML Logging within tags

I'm trying to generate an XML log that logs messages one after the other, for example Message 1 Message 2 //Next messages to append here I've looked…
D4y
  • 63
  • 1
  • 4
0
votes
2 answers

specify directory for filehandler for log files

Handler h = new FileHandler("MyDailyLogFile_" + sdf.format(date) + ".log", true); I am looking produce daily log file for my application. I have a run script in directory home\lse\scripts from which the application runs. This is…
MooHa
  • 819
  • 3
  • 11
  • 23
0
votes
1 answer

Memory Leak using C++ Exceptions

I'm struggling to write a little file handle class in C++11. I know there already is a lot in the STL to actually handle files, but for learning purposes I wanted to do this by myself. Unfortunately I don't seem understand, what effect exceptions…
user2036087
  • 311
  • 1
  • 2
  • 11
0
votes
1 answer

Displaying a database image with MVC page

I have an MVC web application and am trying to display an image (from the database) on a page, with no success. Following various examples that I have found; I have my page "ImageTest.aspx" and a handler "ImageViewer.ashx" The content of the handler…
Sean
  • 862
  • 8
  • 28
0
votes
0 answers

JavaEE Logging: Filehandler doesn't write int extfile

I'm trying to write some Logger Methods for a JavaEE WebApp. After having some conflicts with Annotations i got this as my Logging Class: import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger; import…
mammago
  • 247
  • 2
  • 13
0
votes
1 answer

perl filehandle doesn't read file with space in its name

I have a java program that call my Perl script to upload a file. It has a file parameter to the Perl script that contain the location of file to upload. public static void legacyPerlInspectionUpload(String creator, String artifactId,…
help
  • 809
  • 5
  • 18
  • 35
0
votes
2 answers

Formatting Logger File Handler Issue

I am following this guide to output Logger info to a File with a formatted FileHandler. public class TestLog { public static Logger logger; static { try { boolean append = true; FileHandler fh = new FileHandler("TestLog.log", append); …
PandaBearSoup
  • 699
  • 3
  • 9
  • 20
0
votes
2 answers

Java FileHandler to use 24 hour time

I have a FileHandler set up: Logger logger = Logger.getLogger(this.class.getName()); FileHandler handler = new FileHandler(myFile, true); handler.setFormatter(new…
user1514879
0
votes
0 answers

Encode a fileHandler to output unicode characters

I'm using Java FileHandler in my application to write a log file. i need to get output in Unicode characters. so i have set encoding as fileHandler.setEncoding("UTF-8"); in my application. but Unicode characters in output is still display as…
Bishan
  • 15,211
  • 52
  • 164
  • 258
0
votes
2 answers

How to read excel File from ASHX page?

Hi i have uploaded file to one amazon s3 server,how can i read excel file and want to send excel data to database. my code is