setInterval(24 * 60 * 60); $this->setTimeSensitivity(self::TIME_INSENSITIVE); } protected function run($argument) { $this->userManager->callForSeenUsers(function (IUser $user): void { $storages = $this->userGlobalStoragesService->getAllStoragesForUser($user); $usesLoginCredentials = array_reduce($storages, function (bool $uses, StorageConfig $storage) { return $uses || $storage->getAuthMechanism() instanceof LoginCredentials; }, false); if (!$usesLoginCredentials) { $this->credentialsManager->delete($user->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER); } }); } } deFloats'>Temp_BasicSideFloats Apache XML Graphics FOP: https://github.com/apache/xmlgraphics-fopwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/pdf/ASCIIHexFilter.java
blob: 200d1e13efb5fce713204092ade8bc3963b3eeb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * $Id$
 * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources.
 */
package org.apache.fop.pdf;

import java.io.OutputStream;
import java.io.InputStream;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * ASCII Hex filter for PDF streams.
 * This filter converts a pdf stream to ASCII hex data.
 */
public class ASCIIHexFilter extends PDFFilter {
    private static final String ASCIIHEX_EOD = ">";

    /**
     * Get the name of this filter.
     *
     * @return the name of this filter for pdf
     */
    public String getName() {
        return "/ASCIIHexDecode";
    }

    /**
     * Get the decode params.
     *
     * @return always null
     */
    public String getDecodeParms() {
        return null;
    }

    /**
     * Encode the pdf stream using this filter.
     *
     * @param in the input stream to read the data from
     * @param out the output stream to write data to
     * @param length the length of data to read from the stream
     * @throws IOException if an error occurs reading or writing to
     *                     the streams
     */
    public void encode(InputStream in, OutputStream out, int length) throws IOException {
        Writer writer = new OutputStreamWriter(out);
        for (int i = 0; i < length; i++) {
            int val = (int)(in.read() & 0xFF);
            if (val < 16) {
                writer.write("0");
            }
            writer.write(Integer.toHexString(val));
        }
        writer.write(ASCIIHEX_EOD);
        writer.close();
    }

}